home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / disectv1.lha / document / DisectV1.8.doc next >
Text File  |  1995-07-12  |  125KB  |  2,597 lines

  1. * ------------------------------------------------------------------------- *
  2.  
  3.         Disect V1.8 - © DMA 1994-5    26.11.94 ->
  4.         ==========================    ===========
  5.  
  6.  1) Introduction        * READ THIS FIRST !!!
  7.  2) Disect Request Windows    * life will be easier if you read this!
  8.  3) The Program Screen
  9.  4) A Disassembler Tutorial    * DO THIS to realise the potential!
  10.  5) Symbol Selection Window    * life will be easier if you read this!
  11.  6) Address Functions
  12.  7) DataStrings
  13.  8) Key Macros        * life will be easier if you read this!
  14.  9) Expressions        * life will be easier if you read this!
  15. 10) MultiBin Files
  16. 11) Screen Icons Reference
  17. 12) Keyboard Reference
  18. 13) Mouse Reference        * life will be easier if you read this!
  19. 14) Menu Reference
  20. 15) Process Variables Memory
  21. 16) Grabbing An Existing Process
  22. 17) Auto Trace Mode
  23. 18) Hardware Monitor        * only for those who know...
  24. 19) 68020 Modes/Instructions
  25. 20) Installing To Hard Drive
  26.  
  27. 21) Contact Address        * when you've decided to register...
  28.  
  29. * ------------------------------------------------------------------------- *
  30.  
  31. 1) Introduction
  32. ===============
  33.  
  34.     Welcome! Now, I know what you're thinking... 'I can't be bothered
  35. reading all these dox!'. Well, I'm sorry, but eventually you're going to have
  36. to do so. To try and make things easier, I've commented the contents (above)
  37. to try and steer you in the right direction to begin with. After that, read
  38. either whatever you need to, or whatever you're interested in. And, it goes
  39. without saying, but if at all possible, get a copy of this file printed!
  40.  
  41.     Disect is a very powerful combined disassembler/debugger program,
  42. which has been designed to be easy to use. Its power is achieved at the
  43. expense of memory: the minimum requirement is 1Mb; for larger projects, 2Mb
  44. will be required. The programmer neither encourages nor condones its use to
  45. assist in illegal duplication of copyright software. Disect can be used for
  46. two main purposes: development of software; and the gaining of knowledge
  47. (hacking can be very educational).
  48.  
  49.     The debugger allows an executable file, a disk boot-block, a
  50. binary file, or an area of memory to be loaded and created as a Process. It
  51. is even possible to grab an existing memory-resident Process. A Process's
  52. instructions can be executed individually, or the Process can be activated,
  53. with or without breakpoints installed. System exceptions can be trapped
  54. before they crash the machine, and program symbols can be read from execut-
  55. able files.
  56.  
  57.     The disassembler allows a loaded program to be commented, have
  58. blank lines inserted, and have it's numbers and addresses replaced with
  59. constant or program symbols. All the symbols of Release 3 of the system
  60. include files are available to the disassembler. A program which has been
  61. dissected in this way can then be saved as two source files: a program file,
  62. and a support file. The support file will contain EQUs for all required
  63. constant symbols. System constant symbols can be EQUs (grouped by the SI file
  64. where they live), or alternatively the support file can INCLUDE all required
  65. SI files. Disect data files can be saved, to be reloaded later: 'hold on to
  66. your hacks'!
  67.  
  68.     Disect requires Release 2 of the Amiga operating system; it also
  69. requires the ASL library.
  70.  
  71.     If you've paid your shareware fee then you'll have the full
  72. version. Otherwise, the copy you've got is (hopefully) only a demo. This
  73. has a few differences: you cannot disassemble to file; you cannot extract
  74. program symbols from executable files. In addition, you will not have all of
  75. the system symbol data files. If this is so, and since, as I don't doubt,
  76. you'll be impressed by this program, then don't hesitate in registering
  77. today, by sending your name and full address, and a cheque/postal order for
  78. £30, to the address which you'll find at the end of this file. As well as
  79. receiving a registered version, you'll also be entitled to technical support
  80. (by mail) if required. If you like this program, it's well worth the money.
  81.  
  82.     'Disect' is Shareware, Copyright © D.M.Alderson 1994/5, all
  83. rights reserved. Duplication for the purpose of backups is permitted, but
  84. not for the purpose of selling or otherwise distributing the software,
  85. manual, or other related items, which includes '.dsct' data files only for
  86. commercial purposes, without written permission from the author. This does
  87. not apply to the demo version of the software, which in such instances would
  88. include the manual, and other related items, but not including '.dsct' data
  89. files unless for commercial purposes.
  90.  
  91.     The author does not make any warranty, express or implied, with
  92. respect to the software or any related item, their quality, performance, or
  93. fitness for any purpose. It is the responsibility solely of the purchaser
  94. to determine the suitability of the software for any purpose. In no event
  95. will the author be liable for incidental or consequential damages of any kind
  96. in connection with the software product, manual, or other related items and
  97. processes including, but not limited to, any interruption of service, loss of
  98. business, anticipated profit, or other consequential damages. ETC.
  99.  
  100.     Disect was written using a 2 meg A500+ (without a hard drive! -
  101. will people PLEASE hurry up and register?)
  102.  
  103. * ------------------------------------------------------------------------- *
  104.  
  105. 2) Disect Request Windows
  106. =========================
  107.  
  108.     The program takes much of its input through 'request windows'.
  109. These are standard windows containing string and button gadgets, etc. The
  110. more commonly used windows have keyboard shortcuts. Where available, these
  111. consist of the first letter of the text within the gadget (which will be
  112. underlined). One exception is the 'Select Address Base' request: to select
  113. '+ Decimal' you use key 'p'; to select '- Decimal' you use key 'm'.
  114.  
  115.     Many of the windows allow specification of a number of address
  116. ranges (eg: when searching memory). These contain a list of the currently
  117. defined address ranges, and two string gadgets to input the start and end
  118. addresses (inclusive) of a range. You should input the start, and then the
  119. end, after which, if the range is ok, the address range will be stored. Note
  120. that you may not enter zero as an address. For most of the windows, the
  121. ranges list will be initialised to contain the start and end addresses of
  122. any loaded project memory. If you LMB on any address range, it will be
  123. selected, and can then be changed. If you select a range, then enter no
  124. input for the start and end addresses, the range will be deleted from the
  125. list. The RMB can be pressed to un-select a selected address range.
  126.     Instead of having to enter the actual end address into any end
  127. address string gadget, it is possible to instead enter the size of a memory
  128. area, by preceeding it with a comma. You can also enter, for example: '+12',
  129. which will result in an address range of 13 bytes (ie: end address = start
  130. address + 12). For an address range of a single byte, you can simply enter
  131. '='.
  132.  
  133.     Be aware: it is essential to always press Enter when entering
  134. a number or expression into any string gadget, especially during definition
  135. of a key macro.
  136.  
  137.     One last thing: if Disect seems to lock-up, try pressing any
  138. SHIFT key, or any ALT key, or the CTRL key.
  139.  
  140. * ------------------------------------------------------------------------- *
  141.  
  142. 3) The Program Screen
  143. =====================
  144.  
  145.     As of V1.2, Disect incorporates menus for most functions. To
  146. prevent contention between menus, and Disect's use of the RMB, in order
  147. to select from a menu, you must first RMB click on the menu bar, in order
  148. to 'activate' the menus. To disable the menus, and allow Disect to respond
  149. to the RMB in the main window, you simply LMB on the window, away from the
  150. menu bar (for example, on the status/message area).    
  151.  
  152.     At the top of the screen is displayed the available chip and
  153. fast memory, various function icons, and the program's status/message output.
  154. The status message consists of the current state of any Process (--- none,
  155. -S- Process suspended, -A- Process active, -W- Process Wait()ing), info of
  156. any defined disassembly window markers, and the number of address stack
  157. entries. The icons (from left to right) are: unused; auto-data; address
  158. stack (3 icons); INCBIN; workbench screen; disassembly window left/right
  159. scroll arrows. See below for more info.
  160.  
  161.     Below this is the disassembly window area. There can be either
  162. one or two disassembly windows open at once: the tab key will toggle between
  163. single and double window mode. The cursor keys can be used to scroll windows,
  164. while pressing shift also will move a window faster. In double window mode,
  165. pressing the left alt key will select the lower disassembly window. This
  166. applies to the cursor keys as well as other disassembly window keys (eg: A,
  167. F1-F9, F10).
  168.     In each disassembly window, you'll find up and down arrow gadgets
  169. for scrolling the window. Normally, these work upon the window in which they
  170. are situated. It is possible, however, to use either pair of arrow gadgets
  171. to scroll the memory window, by also pressing the right ALT key.
  172.  
  173.     Next down is a window which displays the PC and SR values, and
  174. the source effective address (SEA) and destination effective address (DEA) of
  175. the instruction at the PC, when applicable. Also displayed is the content
  176. of these addresses. There are two lines of this: the upper line displays
  177. the current values, while the lower line displays the previous values. This
  178. allows the SEA/DEA content to be seen to be affected after execution of an
  179. instruction, which is not possible with programs which display only the
  180. current values. The upper line can be used to enter new values for the PC
  181. and SR, via LMB on the digits of the PC, or the digits/letters of the SR.
  182. To enter a new SR value, a request window will be opened. This allows input
  183. of either an expression (denary/hex/binary/symbols), or any combination of
  184. the letters XNZVC to denote which flags are to be set: any unspecified flags
  185. will be cleared. If no input is received, then the PC/SR is unaffected. If
  186. the Process is active, then attempting to change the PC or SR will have no
  187. actual effect.
  188.     The third line in this window is the 'register zoom'. This can
  189. be locked to any of the registers d0-d7 or a0-a7, and displays the register
  190. content, and the content of this address and the next 15 bytes upward in
  191. memory, as denary/hex (depending on the currently selected base), and as
  192. ascii characters. The '·' character is displayed for any bytes not within
  193. the ascii range of 32 to 127. The locked register is selected by LMB on the
  194. text of 'd0', 'd1', etc in the register window. The register zoom can also
  195. be locked to the SEA or DEA of the instruction at the PC, if a Process has
  196. been created, by LMB on the text of 'sea=' or 'dea=' in the first line of the
  197. window.
  198.  
  199.     The register window is the lower-left window on the screen, and
  200. this displays the register values as denary/hex. For data registers, the
  201. register content is displayed also as ascii. For address registers, the
  202. register content is also used as an address; the content of this is displayed
  203. as denary/hex and ascii. Any of the registers can be given new values in the
  204. same way as the PC, by LMB on the digits of the register value. A nice little
  205. feature which you may at times find useful is, when entering for an address
  206. register value, instead of an address, you may enter, for example:
  207.  
  208.         >a text string
  209.  
  210. This has the effect of storing all the input text after the '>' character,
  211. and setting the address register to point to the stored text. Disect contains
  212. eight such text buffers, each of which may contain up to 63 characters.
  213.  
  214.     The lower-right window is the memory dump. This can be scrolled
  215. using cursor keys and the right alt key. The shift key applies for the up
  216. and down cursor keys as it does for the disassembly window. By LMB on the
  217. address digits, you can input a new address for any of the separate lines in
  218. the window. When you do this, the addresses of any lines below the affected
  219. one will be updated, but any above it will remain unchanged. This allows, for
  220. example, the first line to be locked on one memory location, the second to be
  221. locked on another, and the remaining six lines to be used as a memory dump
  222. starting from yet another address. If you use the cursor keys to move the
  223. window, the first two lines will stay where they are in memory, and only the
  224. continuous block of six lines will be moved. Neat eh? Note that a much bigger
  225. memory dump window can be accessed by pressing 'm'.
  226.     If you have a Process, then try this now: enter the following
  227. into the address area of the first line: PROCP. This will move the window
  228. to the Process structure; the fields of this structure are displayed using
  229. (abbreviations of) the structure field names.
  230.  
  231. * ------------------------------------------------------------------------- *
  232.  
  233. 4) A Disassembler Tutorial
  234. ==========================
  235.  
  236.     The best way to understand something is to do it, so on the disk
  237. you'll find an executable file called 'KeepASL' (in the Tutorial drawer).
  238. This is a little utility I wrote ages ago since I was fed up with having to
  239. reload the ASL after each time I assembled something. All it does is to open
  240. the ASL library and the clipboard device, preventing them from being removed
  241. from memory. So load up Disect, and select 'Load Executable' from the project
  242. menu.
  243.  
  244.     The next request allows you to define whether or not to create a
  245. Process, and extract any symbols from the executable file. Leave these un-
  246. checked (you don't need to create a Process for the disassembler, and there
  247. are no symbols in 'KeepASL'). The string gadget allows you to enter any CLI
  248. arguments to be passed to the executable file (again, not required now). So,
  249. just LMB on 'OK'.
  250.  
  251.     The executable will be loaded, and the disassembly window moved
  252. to it's start address. Note that marker 9 will be defined at the address -
  253. marker 9 is always defined at the start address of any loaded executable/
  254. binary/boot, etc. When you load a binary file, marker 8 will be defined at
  255. its end address, so if you were to save the binary file later, you could
  256. enter 'm9' for the save binary start address, and 'm8' for the end address.
  257.  
  258.     Next, if you haven't already done so, load the SysSymbol data for
  259. the following directories: DOS, EXEC, INTUITION. This is done by pressing the
  260. 'Help' key to access the 'Resident SysSymbol Data Preferences', selecting the
  261. required data, then 'Use'. This request also allows you to load and save the
  262. preferences, or to quit, which will restore the preferences to the state they
  263. were when you pressed 'Help'.
  264.  
  265.     In the disassembly window, you'll have something like this:
  266.  
  267. 0000665256        move.l    4.w,665604
  268. 0000665264        bsr.w    665504
  269. 0000665268        lea.l    665766(pc),a1
  270. 0000665272        moveq.l    #0,d0
  271. 0000665274        movea.l    665604(pc),a6
  272. 0000665278        jsr    -552(a6)
  273. 0000665282        move.l    d0,665608
  274. 0000665288        beq.w    665406
  275. 0000665292        lea.l    665784(pc),a1
  276. 0000665296        moveq.l    #0,d0
  277. 0000665298        movea.l    665604(pc),a6
  278. 0000665302        jsr    -552(a6)
  279. 0000665306        move.l    d0,665612
  280.  
  281. Obviously, the addresses will be different but the methods are the same.
  282.  
  283.     First of all, LMB on the area between the address and the mnem-
  284. onic of the first line, and enter the text 'main'. From the request window,
  285. select 'Instruction'. This will define a program symbol for the first address
  286. of the program, and will log the address as an instruction. Incidentally, if
  287. you ever enter a program symbol name which does not fit into the available
  288. area, the end of the name will not be lost. On the screen, only the first 11
  289. characters will be visible; when you disassemble to a file, the whole of the
  290. name will be output.
  291.  
  292.     Now, LMB on the destination effective address of the first line.
  293. This will open the symbol selection window (see below for specific info).
  294. Activate the string gadget which presently contains the LMB'd address, and
  295. enter the text 'sys_base'. From the request windows which open, you should
  296. define the address type as 'Variable', the address size as 'Long', and the
  297. address base as '+ Decimal'. What this does is to log the DEA of the first
  298. instruction as a long variable, the content of which will be displayed as
  299. positive (unsigned) denary. Just to make sure, RMB on the DEA of the first
  300. line, and you'll see:
  301.  
  302. 0000665604    sys_base    DC.L    0
  303.  
  304. The previous disassembly window address will have been stacked (look at the
  305. status message), so you can return there either by LMB on the third icon
  306. from the left at the top of the screen, or by pressing F10. Do this now!
  307.  
  308.     You'll notice that as well as having replaced the DEA of the
  309. first line with the program symbol 'sys_base', Disect will also have replaced
  310. all other references to this address. This feature can be disabled by press-
  311. ing 'Del', and unchecking 'AutoSymbol', BUT DON'T DO THIS NOW!
  312.  
  313.     Now, to make the source more readable, we'll add a blank line
  314. after each of the following lines in the disassembly window: the first, the
  315. second, and the eighth line. Do this by LMB on the mnemonic of each of these
  316. lines. This will open the 'Address Functions' request, from which you should
  317. select 'Add Blank Line' (at lower-left of window). For the second and eighth
  318. lines, you'll get the 'Address Type' request, since these addresses have not
  319. yet been logged - obviously, these should be logged as instruction addresses.
  320. This will result in the following:
  321.  
  322. 0000665256    main    move.l    4.w,sys_base
  323.  
  324. 0000665264        bsr.w    665504
  325.  
  326. 0000665268        lea.l    665766(pc),a1
  327. 0000665272        moveq.l    #0,d0
  328. 0000665274        movea.l    sys_base(pc),a6
  329. 0000665278        jsr    -552(a6)
  330. 0000665282        move.l    d0,665608
  331. 0000665288        beq.w    665406
  332.  
  333. 0000665292        lea.l    665784(pc),a1
  334. 0000665296        moveq.l    #0,d0
  335.  
  336.     Next, LMB on the text '-552' (or -$228), then on the text 'exec'
  337. in the lower window. You'll probably have guessed already, but LMB on the
  338. text '_LVOOpenLibrary' in the upper window, then select 'Confirm', and define
  339. the address as 'Instruction'. Now, we all know that a call to exec.Open-
  340. Library() requires a1 pointing to the library name text, so RMB on the SEA of
  341. the third line. What you now see won't look like much, until you've done the
  342. following: define a program symbol at the first line in the disassembly
  343. window, 'name' will do, and define the address as Data/Byte/ASCII/0. Now
  344. we know what library it is, we can change the program symbol from 'name' to
  345. 'int_name':
  346.  
  347. 0000665766    int_name    DC.B    "intuition.library",0
  348.  
  349.     The last request window ('Select Data Area Size') allows you to
  350. define how many bytes there are in a data area in five ways: you can enter
  351. an expression to define the number of BYTES; you can simply press 'Enter' to
  352. make it consist of one byte, one word, or one long (depending on the address
  353. size already defined); you can select '0' to make the data area end at the
  354. first NULL byte/word/long; you can select '-1' (end at first -1 byte/word/
  355. long); or you can select 'Symbol' to make it end at the byte before the
  356. address of the next defined program symbol.
  357.  
  358.     If you now press F10, you'll see that the address reference will
  359. have been replaced with 'int_name'.
  360.  
  361.     Next, press the 'A' key, and enter the following: '[0:$58]'. This
  362. will move the disassembly window to the $58th byte of the first hunk. Here,
  363. you will see a 'jsr' as the third line. LMB on the text '-204' or '-$cc',
  364. and replace it with '_LVOOpenWindow'. So, the first line contains the address
  365. of a NewWindow structure, so RMB on this address to move the disassembly
  366. window to this data. Now press key 'X', (or select 'Define DataString' from
  367. the 'Functions' menu), and from the list of system DataStrings, LMB on the
  368. text 'NewWindow', then select the 'Define' gadget. The NewWindow structure
  369. data area will be logged, and Disect will inform you that it has found an
  370. address pointer within the NewWindow structure, which points to an ASCII
  371. string. Click on the 'Define' gadget, and the ASCII string will also be
  372. defined as a data area. The disassembly window will now be returned to the
  373. address of the NewWindow structure. For further information about DataStrings
  374. I STRONGLY recommend that you read section 7.
  375.  
  376.     Well, we could go on like this for all of the 560 bytes of the
  377. program, but fortunately, you don't have to. Instead, select 'Load DSCT Data
  378. File' from the project menu, 'Erase', then load the file 'KeepASL.dsct':
  379.  
  380.     ; * -------------------------------------------------------------
  381.  
  382.     ; Disassembly of 'KeepASL' - DMA 1.10.94
  383.  
  384. 0000665256    main    move.l    (EXEC_BASE).w,sys_base
  385.  
  386. 0000665264        bsr.w    start_up        ; WB/CLI start up
  387.  
  388. 0000665268        lea.l    int_name(pc),a1    ; open intuition
  389. 0000665272        moveq.l    #0,d0
  390. 0000665274        movea.l    sys_base(pc),a6
  391. 0000665278        jsr    _LVOOpenLibrary(a6)
  392.  
  393. Much better than the original, eh!
  394.  
  395.     Now, we're going to disassemble the whole program to source, so
  396. press 'd'. This gives the 'Disassemble To File' request. The disassembly
  397. address range will be initialised as the address range of the loaded program.
  398. Note that with executable files, there may be more than one hunk in the file,
  399. so it is possible to disassemble more than one address range. Now, using the
  400. two string gadgets at the bottom of the window, enter the two path/file names
  401. as 'RAM:Program.s' and 'RAM:Support.s', then select either to EQU or INCLUDE
  402. system constant symbols (I suggest EQU), and select 'OK'.
  403.  
  404.     After a short time a request window will open, informing you that
  405. an immediate long has been found. This means that Disect has found a number,
  406. as immediate data, which is within the project memory range. It is possible
  407. for such numbers to be immediate data, or program addresses, but it should
  408. be fairly obvious for you to decide which from the context in which they are
  409. used. For such numbers, Disect will display any matched program symbol name,
  410. or alternatively, the previous program symbol to the address along with the
  411. required offset to match the value of the number. From this request, you have
  412. a choice of leaving the number as immediate data, replacing the number with
  413. the symbol (or symbol+offset), or quitting the disassembly process.
  414.  
  415.     In our case, the number should be replaced (it's actually the
  416. nw_Title pointer of the NewWindow structure). Ok, when it's done, load up
  417. the two source files (you'll actually find them in the Tutorial drawer,
  418. although I suggest you DO have a go at all this). Have a look at them...
  419. Nice, aren't they! AND, they'll assemble correctly.
  420.  
  421. * ------------------------------------------------------------------------- *
  422.  
  423. 5) Symbol Selection Window
  424. ==========================
  425.  
  426.     A major feature of Disect is its ability to replace numbers
  427. present within a program with symbols. Disect can distinguish between two
  428. different types of symbols:
  429.  
  430. PROGRAM    A program symbol refers to a specific address within the program.
  431.     This may be either the destination of a branch, etc, or an access
  432.     to a variable, or the address of data.
  433.  
  434.     There are two kinds of program symbol, system and user. System
  435.     program symbols, or system address symbols, are used to refer to
  436.     absolute addresses in memory, for example, the addresses of chip
  437.     registers. These form part of Disect's predefined system symbol
  438.     list. User program symbols are defined by the user, and are used
  439.     to refer to addresses within the program being disassembled.
  440.  
  441. CONSTANT    A constant symbol refers to any number used as immediate data, or
  442.     as a displacement for the following addressing modes:
  443.  
  444.     ARID    dd(ax)        ARIDI    dd(ax,rx.x)
  445.     PCD    dd(pc)        PCDI    dd(pc,rx.x)
  446.  
  447.     Disect's predefined system symbol list includes all of the system
  448.     constants of Release 3.0 of the system include files. These are
  449.     divided into three classifications:
  450.  
  451.     LVO    a library vector offset used with: jsr dd(ax)
  452.     Structure    a system structure offset used with: dd(ax)
  453.     Constant    all other system symbols
  454.  
  455.     User constant symbols are defined by the user. There are three
  456. different types of these: normal constant symbols; constant symbols which
  457. represent offsets from a Process's variables-memory base address register
  458. ('variable constants'); and 'address constants'. Address constants are
  459. temporary symbols which make it easier to see what a Process is doing. For
  460. example, if a Process calls Inituition.OpenWindow(), on exit, d0 will point
  461. to the Window structure. Obviously, you cannot define a program symbol for
  462. this address (outside project memory), but if you were to then press the
  463. 'CTRL' key, and LMB on the 'd0' text in the register window, a request
  464. window will open into which you can enter a symbol name, eg: 'WINDOWP'.
  465. Now, whenever any register contains the address of this symbol, then this
  466. name will be displayed in the register window instead of the address.
  467.  
  468.     A valid symbol name must begin with either a letter, or the
  469. characters '_' or '.', and may continue with any of these, as well as digits.
  470. Disect supports the use of local program symbols, which must be prefixed
  471. with either a '_' or '.' character, depending upon the current preference
  472. setting. There are a certain number of reserved symbol names which cannot
  473. be used when defining a symbol. The list of these can be found in section 9.
  474.  
  475.     In order to replace a number within a program, all you have to
  476. do is LMB on the number in the disassembly window. This will open the Symbol
  477. Selection Window, which is used to specify which symbol(s) are to be used to
  478. replace the number. In addition to using real symbols, Disect also allows
  479. 'fake' symbols to be created. These are symbols which have no name text.
  480. Instead, the 'name' is the value of the symbol displayed in whatever base you
  481. select. For example, instead of replacing the number 16 with the real symbol
  482. 'MP_SIGTASK', you could replace it with the fake symbol '%10000'. Or, the
  483. number 65 may be replaced with a fake symbol: "A". The possible bases for
  484. fake symbols are decimal, hex, ASCII, binary. Such symbols will appear in
  485. the symbol list where appropriate.
  486.  
  487.     Whenever you replace a number, the address where the number
  488. occurs becomes logged in the usual way. In addition, if you are replacing
  489. an address with a (new, program) symbol, then this address is also logged.
  490. Consider the following:
  491.  
  492. 632472        move.l    632804,d0
  493.  
  494.     ~    ~    ~
  495.  
  496. 632804        ori.b    #0,d0
  497.  
  498. If you LMB on the '632804' in the first line, and replace it with a symbol,
  499. eg: 'variable', then the addresses of both lines will be logged. First,
  500. Disect will allow you to define the address type for the equivalent address
  501. of '632804' (although INCBIN is not supported in this way, at present). In
  502. this example, it might be address type: VARIABLE/LONG/... This will log the
  503. second address, and assign to it a program symbol (named 'variable'). After
  504. this, the Symbol Selection window will close, and Disect will then request
  505. the characteristics of the first address (INSTRUCTION).
  506.  
  507.     The Symbol Selection window contains two list windows. The left
  508. window will display the current list of matched symbols. You may select a
  509. symbol from the list by LMB on it within this window. The right window will
  510. display either a list of system include directories, or a list of the files
  511. within a selected directory. You can LMB on a directory or file name in order
  512. to limit the symbol search to only the selected directory or file. If you RMB
  513. on a system constant symbol (in the other list), then this will select the
  514. system include directory and file which contains that symbol. Note that if
  515. you RMB anywhere else (not in the symbol list window), then the current list
  516. of symbols will be sorted alphabetically.
  517.     The currently selected system include path is displayed above the
  518. includes list window; to the right of this text is a 'Parent' gadget to un-
  519. select the current directory and file names.
  520.  
  521.     In the symbol list window, if a symbol has a '*' character disp-
  522. layed after its name, then this denotes that the symbol is not defined in
  523. the official system includes. There are quite a few of these to allow greater
  524. flexibility. They include 'FLAGB_' and 'FLAGF_' definitions of 680x0 process-
  525. or flags (in exec/execbase.i), and a complete list of raw key codes (devices/
  526. keyboard.i), as well as some hardware bits symbols. When disassembly to file,
  527. any such symbols will be output to the support file as EQUs.
  528.  
  529.     Above the symbol list window, are four gadgets. The first two
  530. gadgets allow selection of the type of symbol to be searched for. The first
  531. gadget selects between System or User symbols; the second, between Program or
  532. Constant symbols.
  533.     The third gadget allows you to select the type of search to be
  534. performed; there are two possible types of symbol search: Value, and Bit.
  535. The first will search all resident symbols for a direct value match with the
  536. number to be replaced. A Bit search will list all symbols for which a set
  537. bit in the original number corresponds to a set bit in the symbol's value.
  538. This is used when replacing a number which represents bitwise OR of multiple
  539. bit flags. As examples:
  540.  
  541.         move.l    #IDCMP_RAWKEY+IDCMP_CLOSEWINDOW,(a0)
  542.  
  543.         move.w    #DMAF_MASTER+DMAF_COPPER,dmacon(a5)
  544.  
  545. When searching for symbols in this way, when you have selected the first
  546. symbol to be used, Disect will then only list symbols which represent bits
  547. in the same group of flags (eg: only IDCMP_ flags, or only DMAF_ flags).
  548.  
  549.     The fourth gadget depends on the current symbol type: for program
  550. symbols, a 'Prev' gadget will exist; for constant symbols, an Offset cycle
  551. gadget will exist.
  552.     The 'Prev' gadget will automatically select the system/user
  553. program symbol with a value previous to that of the number being replace
  554. (which would be an address). This is useful for finding, for example, a
  555. reference to the low byte of a word variable (assuming you have already
  556. defined a program symbol for the address of the word), or a refernce into
  557. a data table. It becomes especially useful if replacing a system address:
  558. for any direct address reference to a hardware register, pressing this
  559. gadget will result in the symbol 'CUSTOM_BASE' being automatically selected
  560. (ie: address $DFF000). The apprioriate symbol from the hardware directory
  561. (custom.i) can then be selected to account for the required offset to the
  562. actual address. When you attempt to find a previous (user) program symbol,
  563. Disect will only use a local program symbol if this does not result in a
  564. reference to a local program symbol across the bounds of a global program
  565. symbol.
  566.     When searching for system/user constant symbols, the Offset cycle
  567. gadget will be displayed. This allows you to select an offset value to be
  568. used when searching for a symbol value match. The possible offsets are:
  569. -1, -2, -3, +1, +8, +16, +24. Such an offset represents the value to be added
  570. to the original search value in order to find the value to which the symbol
  571. search must match symbols. For example:
  572.  
  573.         btst.b    #INTB_AUD3,intreqr(a5)
  574.  
  575. Now, INTB_AUD3 has the value 10, ie: bit 10 of the word-register. When this
  576. is assembled (some assemblers would allow the above, some would require you
  577. to have '-8' after the 'INTB_AUD3'), the resulting code would actually be:
  578.  
  579.         btst.b    #2,$1E(a5)
  580.  
  581. So, when you LMB on the '2' in the disassembly window, obviously Disect would
  582. search for symbols of value 2. If you've already replaced the '$1E' with
  583. 'intreqr', then you'll be expecting an 'INTB_' symbol. This would return
  584. 'INTB_SOFT'. Incorrect. Hence, an offset of '+8' will solve the problem, and
  585. produce the relevant result (by searching for symbols of value 2+8, hence
  586. 'INTB_AUD3' would be found!). The actual result would, of course, be:
  587.  
  588.         btst.b    #INTB_AUD3-8,intreqr(a5)
  589.  
  590.     Above the four symbol gadgets is a string gadget which is used
  591. for displaying the current search value, or the current list of selected
  592. symbols
  593.  
  594.     Above the four symbol gadgets is a string gadget. This has a dual
  595. purpose of displaying the currently selected list of symbols which will be
  596. used to replace the number, and to allow a symbol name to be input. When
  597. searching for user program or constant symbols, you may enter any valid
  598. unused symbol name here, and this will be created as a new user symbol which
  599. will be assigned the value of the replace-number.
  600.     If you enter the name of an existing system/user symbol, then
  601. this will have the effect of selecting the symbol. In this case, the symbol
  602. search value (ie: originally the number which was being replaced), will be
  603. adjusted to take account of the value of the symbol which you entered. This
  604. is useful since there are times when a number being replaced is formed from,
  605. for example, an accumulation of structure offsets. As an example, consider a
  606. program which allocated it's variables memory dynamically, then accessed them
  607. using ARID mode via a5. Supposing this memory block was 2k in size, and you
  608. have determined that bytes 240 to 273 are used for an MP structure (message
  609. port, exec/ports.i), so you have defined a user constant symbol 'mport' to
  610. have the value 240. Now, you might find the following:
  611.  
  612.         move.b    255(a5),d0
  613.  
  614. What this represents is in fact:
  615.  
  616.         move.b    mport+MP_SIGBIT(a5),d0
  617.  
  618. This can be achieved by entering the name 'mport' (which will be selected,
  619. and the search value of 255 adjusted to 15), then selecting the 'MP_SIGBIT'
  620. symbol by LMB in the symbol list window.
  621.  
  622.     To the right of the string gadget are three check gadgets which
  623. are used to select the type of symbols to be searched for when searching for
  624. system constant symbols. These gadgets will automatically define themselves
  625. according to the context where the replace-number was used. Note that this
  626. cannot be 100% accurate for the type of symbols: always make sure you are
  627. searching for what you want!
  628.  
  629.     Whenever a symbol is selected which results in the search value
  630. becoming zero, then a request window will open. The content of this varies.
  631. If you are making a normal symbol selection (due to LMB in the disassembly
  632. window), then four gadgets will exist: 'New' 'Zero' 'Confirm' and 'Quit'.
  633. When making a dummy symbol selection (due to pressing the 'P' key in the main
  634. window), then a 'Comment' gadget will exist instead of 'Confirm'. If you are
  635. replacing a number within a bitfield instruction (ie: either the offset or
  636. width value), then you get 'New' 'Confirm' and 'Quit'.
  637.     The 'New' gadget will erase the currently selected symbol(s) and
  638. allow a new seclection to be made. 'Zero' will allow you to select further
  639. symbols (of value 0). 'Confirm' will cause the original number in the disass-
  640. embly window to be replaced with the currently selected symbol(s). 'Quit'
  641. will abort, and close the Symbol Selection window. The 'Comment' gadget has
  642. a rather useful purpose (see key 'P' in section 12).
  643.  
  644. * ------------------------------------------------------------------------- *
  645.  
  646. 6) Address Functions
  647. ====================
  648.  
  649.     The Address Functions request is accessed via LMB on the opcode
  650. (mnemonic) area in the disassembly window. The address functions are as
  651. follows:
  652.  
  653. Log Address
  654. -----------
  655.  
  656.     This allows a program address to be logged. You will be requested
  657. the type of the address. This may be instruction, variable, data, copper,
  658. INCBIN, ASCII string (NULL-terminated), or EVEN string (which is the same,
  659. except Disect will ensure that the string ends at an odd address, so that
  660. the next address is therefore even). Note that any extra pad byte used to
  661. word-align the string must be NULL. If a Process exists, then when an address
  662. is logged (by any method), if the PC is at the address, then it will be auto-
  663. matically defined as an instruction address.
  664.  
  665. INSTRUCTION    This is the default address type for all addresses at which the
  666.     opcode can be successfully identified as a valid instruction.
  667.  
  668. VARIABLE    This allows an address to be defined as a byte, word, or long
  669.     variable. The base in which the variable's value should be
  670.     displayed can also be defined.
  671.  
  672. DATA    Similar to a variable address, a data address consists of any
  673.     number of bytes, words, or longs. The size of the data area can
  674.     be specified by either: pressing Enter (for 1 byte/word/long);
  675.     inputting an expression to determine the number of bytes of data;
  676.     selecting the '0' or '-1' gadget (data continues up to & includ
  677.     -ing the first 0 or -1 byte/word/long); or selecting the 'Symbol'
  678.     gadget (data area continues until next defined program symbol).
  679.     Incidentally, there is another way of defining data areas. See
  680.     section 7.
  681.  
  682. COPPER    A copper address will be disassembled as a macro which, when
  683.     assembled, will create the relevant copper instruction. These
  684.     macros will be output to the support source file during file
  685.     disassembly (if required). Note that for copper move instruction,
  686.     if the hardware SysSymbol data is resident then the move destin-
  687.     ation address will automatically be replaced with the relevant
  688.     symbol for the hardware register it refers to.
  689.  
  690. INCBIN    This allows data areas to be defined as INCBIN areas. Such areas
  691.     will be disassembled as an INCBIN directive. Upon selection of
  692.     this, Disect will request the INCBIN data area size. After this,
  693.     the ASL is used to select the file to which the data area should
  694.     be written. See also the section about the INCBIN request window.
  695.  
  696. ASCII    The data area will be defined as an ascii string, terminated by
  697.     a NULL byte.
  698.  
  699. EVEN STRING    As ASCII, but is guaranteed to be even.
  700.  
  701. AS PREVIOUS    This will automatically define an address of the same type, etc,
  702.     as the previously defined address. Be careful not to use this
  703.     after, for example, defining an address via the Symbol Selection
  704.     Window, since this would be taken as the previous address type.
  705.  
  706. Amend Address
  707. -------------
  708.  
  709.     This allows a previously-logged address to be amended.
  710.  
  711. Erase Address
  712. -------------
  713.  
  714.     This will remove anything that has been attached to the address.
  715.  
  716. Add/Erase Section Header
  717. ------------------------
  718.  
  719.     A section header is a line of '-' characters, which will be added
  720. before the address.
  721.  
  722. Add/Erase Header Comment
  723. ------------------------
  724.  
  725.     These options allow a full-line comment to be added before the
  726. address, or to be removed from the address.
  727.  
  728. Add/Erase Line Comment
  729. ----------------------
  730.  
  731.     These allow an end-of-line comment to be added to the address, or
  732. removed from the address.
  733.  
  734. Add/Erase Blank Line
  735. --------------------
  736.  
  737.     These will add/remove a blank line after the address.
  738.  
  739. Erase Program Symbol
  740. --------------------
  741.  
  742.     This allows a program symbol to be removed from the address.
  743.  
  744. Erase SEA Symbols
  745. -----------------
  746.  
  747.     This option will remove any symbol(s) which have been used to
  748. replace the instruction's source effective address. This includes the offset
  749. and width values for 68020 bit fields.
  750.  
  751. Erase DEA Symbols
  752. -----------------
  753.  
  754.     This option will remove any symbol(s) which have been used to
  755. replace the instruction's destination effective address. This includes the
  756. offset and width values for 68020 bit fields.
  757.  
  758. * ------------------------------------------------------------------------- *
  759.  
  760. 7) DataStrings
  761. ==============
  762.  
  763.     In order to log a data area which consists of a number of byte/
  764. word/long elements, ie: all bytes, all words, OR all longs, you use the
  765. address functions request. This allows you to specify the total size of the
  766. data area, and Disect will log only the first address. Obviously, this can
  767. save a lot of memory for large data areas, since Disect does not have to
  768. store information for each address. This is the best way of logging uniform
  769. data areas.
  770.  
  771.     For any data area where its elements are not all the same size
  772. (byte/word/long), you can use a DataString. The DataString request, accessed
  773. via key 'X', allows you to define your own DataString, or select a system
  774. DataString, and use it to define a data area.
  775.  
  776.     A DataString consists of two strings: the format string, and the
  777. base string. The first specifies the size of each element of a data area;
  778. 'B' represents a byte, 'W' a word, and 'L' a long. The base string defines
  779. the base of a 'piece' of data: 'P' positive denary; 'N' negative denary;
  780. 'H' hex; 'B' binary; 'A' ASCII; 'X' means use the currently selected default
  781. base (either hex or denary, as defined via the preferences). When you use
  782. a DataString to define a data area, successive addresses are logged as data,
  783. the size and base of which corresponds to the relevant characters from the
  784. format and base strings.
  785.  
  786.     Disect contains a number of predefined (system) DataStrings. The
  787. names of these correspond to the names of system structures, eg: Gadget, New-
  788. Window, etc. Each DataString represents the byte/word/long elements of the
  789. relevant system structure. You can also define your own DataStrings, which
  790. will be saved/loaded as part of the Disect data file. In the DataString
  791. request window, after pressing Enter in the base string gadget, if your
  792. DataString is valid, then it will be automatically stored. The LMB can be
  793. used to select a DataString from the currently displayed list.
  794.  
  795.     As of V1.6, when you use a system DataString to define a data
  796. area, a preference exists to allow Disect to automatically add a line comment
  797. to each 'DC.X' directive. These comments will be the names of the fields of
  798. the system structure which the DataString represents.
  799.     When you later LMB on the operand of such a 'DC.X' directive (in
  800. order to replace it with a symbol) then Disect actually uses the line comment
  801. text in order to define which system include file is to be searched within
  802. the Symbol Select window. If the required directory's SysSymbol data is not
  803. resident, Disect will attempt to load it. As well as automatically selecting
  804. which include file, Disect also defines which 'group' of bit symbols should
  805. be listed, if necessary. For example, if you LMB on the number of:
  806.  
  807.     DC.W    $44040        ; nw_IDCMPFlags
  808.  
  809. then the Symbol Select window will open in 'intuition/intuition.i', and only
  810. 'IDCMP_' flag symbols will be listed! If required, once such a number has
  811. been replaced with a symbol, Disect will automatically erase the line comment
  812. text since it is no longer required. This is a preference, and can therefore
  813. be disabled if necessary. In addition, an item exists in the 'Functions'
  814. menu which will erase ALL existing SDS (system DataString) line comments.
  815.  
  816.     When defining an data area using a system DataString, Disect can
  817. detect pointers to other system structures. For example, within a NewWindow
  818. structure, nw_FirstGadget will be detected as pointing to a Gadget structure.
  819. In this case, Disect will move the disassembly window to the address of the
  820. Gadget structure, and a request window will open which allows you to confirm
  821. to Disect that you wish the data area to be defined, or alternatively, you
  822. can cancel the definition.
  823.     The window also contains a string gadget, which will contain
  824. either the text of any existing program symbol at the start of the data area,
  825. or a symbol name which Disect will create automatically. Whichever, this is
  826. the symbol name which will be defined for the first address of the data area.
  827. It is not possible to enter any other program symbol name. For example, for a
  828. Gadget structure, Disect may create a program symbol of 'gadget0'. The number
  829. at the end of the symbol name is defined to be unique for each data area
  830. definition. It is recommended that you use these automatic symbol names
  831. (see below).
  832.     Whenever a data area is defined in this way (due to a pointer to
  833. it within a previously-defined data area), then the program symbol of it is
  834. used to replace the number/address within the existing data area. Example:
  835.  
  836.     DC.L    gadget0        ; nw_FirstGadget
  837.      ~       ~
  838.      ~       ~
  839.      ~       ~
  840. gadget0    DC.L    $13ef26        ; gg_NextGadget
  841.  
  842.     Two of the system structures which are supported by DataStrings
  843. exist as an array of structures. These are TagItem and NewMenu structures.
  844. When you define a data area for either of these structures, Disect will also
  845. define any following structures, until the end of the array. For example,
  846. a TagItem array ends when ti_Tag holds a value of TAG_END.
  847.  
  848.     One last point to mention is that when a data area is defined via
  849. a system DataString (directly from the request window, as opposed to via a
  850. pointer to it in a previously-defined data area), if the first address of the
  851. area does not have a program symbol, then Disect will automatically create
  852. one for the address, as described above. The thing to be aware of is that
  853. when disassembling to a source file, Disect has the ability to detect such
  854. program symbols, and if it does so, it will disassemble the data area using
  855. a single macro (instead of a sequence of DC.X directives). For example:
  856.  
  857. gadget1    DC.L    gadget2
  858.     DC.W    326,4,50,14
  859.     DC.W    GFLG_GADGHCOMP,GACT_RELVERIFY,GTYP_BOOLGADGET
  860.     DC.L    border12,0,intuitxt7,0,0
  861.     DC.W    2
  862.     DC.L    0
  863.  
  864. The above would automatically be converted to:
  865.  
  866. gadget1    GADGET    gadget2,326,4,50,14,GFLG_GADGHCOMP,GACT_RELVERIFY,
  867. &        GTYP_BOOLGADGET,border12,0,intuitxt7,0,0,2,0
  868.  
  869. This will not occur: if any address in the data area has a line end comment;
  870. if any address in the data area other than the first address has either a
  871. header comment, or a program symbol; or if you have not used Disect's auto-
  872. matic symbol names. The syntax for continuing macro parameters over more than
  873. one line follows that required by Devpac. Any required macro definitions
  874. will be output to the Support source file.
  875.  
  876.     As a result of this feature, any program symbol name which might
  877. be created by Disect is now reserved; this means that you cannot use these
  878. names for any other program symbols you might create. The complete list of
  879. reserved symbol names (and macro names) can be found in section 9.
  880.  
  881.     The DataString request window contains the following:
  882.  
  883. Data Start Address
  884. ------------------
  885.  
  886.     A string gadget allows the data start address to be specified.
  887. This will be initialised, when the window opens, to be the start address of
  888. the (upper) disassembly window.
  889.  
  890. DataString Name
  891. ---------------
  892.  
  893.     A string gadget is used to enter the name of a user DataString.
  894. If you enter the name of an existing DataString, it will be selected.
  895.  
  896. Data Format String
  897. ------------------
  898.  
  899.     This string gadget allows you to enter up to 512 characters to
  900. specify the format of the data area. Each data element may be specified to
  901. be byte, word, or long, by entering the characters 'B', 'W', or 'L'. Note
  902. that if you enter, for example, 'LLBBBW', then Disect will automatically
  903. insert an extra 'B' before the 'W' to ensure word-alignment. Disect will
  904. permit an odd number of 'B' if it is at the end of the string.
  905.  
  906. Data Base String
  907. ----------------
  908.  
  909.     This string is used to enter an equal number of characters to
  910. specify the base of each data element. Each may be any of: 'P' positive den-
  911. ary; 'N' negative denary; 'H' hex; 'B' binary; or 'A' ASCII.
  912.  
  913.     Associated with each string are two numbers. The first displays
  914. the number of characters for each string. The second displays the number of
  915. successive, same, characters at the end of each string.
  916.  
  917. System/User Cycle
  918. -----------------
  919.  
  920.     This will toggle between a list of system and user DataStrings.
  921.  
  922. Delete
  923. ------
  924.  
  925.     This will delete the currently-selected user DataString.
  926.  
  927. Define
  928. ------
  929.  
  930.     This will close the window, and cause Disect to attempt to define
  931. the data area using the selected DataString. If an error occurs, the disass-
  932. embly window will be moved to the address which Disect was attempting to log
  933. when the error ocurred. Where possible, Disect will preserve any existing
  934. program symbols and comment texts within the definition data area. Any blank
  935. lines will be removed, but one will be added at the end of the data area.
  936.  
  937. Quit
  938. ----
  939.  
  940.     This will close the window, without defining the data area.
  941.  
  942. * ------------------------------------------------------------------------- *
  943.  
  944. 8) Key Macros
  945. =============
  946.  
  947.     The 'Macros' menu allows up to ten key macros to be defined and
  948. used. This allows sequences of key presses, LMB or RMB clicks, and gadget
  949. and menu selections to be recorded, and played back automatically by pressing
  950. a single key. As an example of just how useful this can be, supposing you
  951. were dissecting a program which contained a data table of, say, a hundred
  952. entries, each one consisting of the following sort of thing:
  953.  
  954.     DC.B    "some text string",0,0
  955.     DC.L    program_function67
  956.  
  957. Before this has been logged as data, it might be disassembled as, for
  958. example:
  959.  
  960. $42be8    DC.W    $736f
  961. $42bea    blt.b    $42c51
  962. $42bec    DC.W    $2074
  963. $42bec    bcs.b    $42c68
  964.       ~       ~
  965.       ~       ~ etc
  966.  
  967. To define a key macro to format a single entry, first of all you would make
  968. sure that the disassembly window is at the start address of the first entry.
  969. You then begin the macro definition by selecting the menu item 'Macros/Begin
  970. Definition/Macro 1'. First, by LMB on the first 'DC.W', you would define the
  971. address as an 'EVEN String'. This gives:
  972.  
  973. $42be8    DC.B    "some text string",$0,$0
  974. $42bfa    ori.b    #$0,-(a0)
  975.  
  976. Next, LMB on the 'ori.b', then select 'Add Blank Line', and define this
  977. address as a single 'Data/Long/Hex' long. Finally, by clicking on the
  978. disassambly window down arrow twice, then pressing 'Enter', the macro will
  979. be defined. By moving the disassembly window down two lines, you will ensure
  980. that each time you use the macro, the relevant addresses will be formatted,
  981. since the macro has been defined to operate upon the first two lines in the
  982. disassembly window. All that is now required is to press the '1' key to use
  983. the macro to define successive entries in the data table, until the end of
  984. table is reached.
  985.  
  986.     During definition or playback of any macro, if any errors occur,
  987. then the macro definition/playback will be aborted. This would result in a
  988. macro NOT being defined. This also occurs if any Process exception occurs;
  989. this includes trace and breakpoint exceptions: macros are not compatible
  990. with Process execution.
  991.  
  992.     Remember! When defining a key macro, you must always press Enter
  993. for all string gadgets which you use!
  994.  
  995.     A defined macro can be replayed either by pressing it's key
  996. (1-0), or using the menu item. Via the menu item, a request window will
  997. open which allows you to specify either to play the macro once, to play the
  998. macro a specific number of times, or to play the macro until an expression
  999. is TRUE. This is probably most useful for something such as the following:
  1000. 'w1=$662084', which would play the macro until the (upper) disassembly
  1001. window reached a certain address.
  1002.  
  1003.     Macro playback can be aborted by clicking on the main program
  1004. window, and pressing Escape.
  1005.  
  1006. * ------------------------------------------------------------------------- *
  1007.  
  1008. 9) Expressions
  1009. ==============
  1010.  
  1011.     Disect allows complex expressions to be input whenever a numeric
  1012. value is required. Such expressions may contain program or constant symbols,
  1013. which may be system or user symbols, although local program symbols are not
  1014. permitted. Numbers may be expressed as denary, hex, binary, or character
  1015. constants (eg: 'a', "ab", 'abc', "abcd"). In addition, addresses can be
  1016. represented as offsets from hunk/project memory starts. For example, the
  1017. text "[0:16]" represents the address of the 16th byte of hunk 0 (the first
  1018. hunk). If there is only one project memory area (eg: an executable of only
  1019. 1 hunk, or a binary file, has been loaded), then a hunk number does not have
  1020. to be specified ("[16]" would be accepted). Any numbers within the "[]"
  1021. characters may be either hex or decimal. If a base offset address has been
  1022. defined, then if you were to input "[16]", then this would be taken as an
  1023. offset from the base offset address (instead of as an offset from the start
  1024. of the first/only hunk).
  1025.     It is also possible to prefix a number with a '.', for example:
  1026. '.$80000046'. This will cause Disect to treat the number as an FFP value,
  1027. which in this case would be evaluated to a value of 32. If the value is too
  1028. large/small to be stored as a long integer, then an error will result.
  1029.  
  1030.     Disect supports the following operators, in decreasing order of
  1031. precedence:
  1032.  
  1033. HIGH PREC    -        MINUS, eg: -32
  1034.     ~        bitwise NOT, eg: ~$0FF0
  1035.     << >>        SHIFT LEFT and RIGHT, eg: %1<<16
  1036.     & ! ^        bitwise AND, OR, EOR
  1037.     * / \        MULTIPY, DIVIDE, MODULO
  1038.     + -        ADD, SUBTRACT
  1039.     = < > <> <= >=    comparisons
  1040.  
  1041.     Precedence may be overridden via parentheses ( and ). Expressions
  1042. are evaluated left-to-right. Byte, word, and long indirection is supported
  1043. via parentheses:
  1044.  
  1045.     {4}.l        long content of address 4
  1046.  
  1047. The following is also possible:
  1048.  
  1049.     {{4}.l}.w        word content of address specified by
  1050.             long content of address 4
  1051.  
  1052.     The comparison operators return the value 0 if FALSE, and -1 (or
  1053. $FFFFFFFF) if TRUE. Expression evalution occurs using 32-bit unsigned integer
  1054. arithmetic. The operator | is equivalent to ! (bitwise OR); != may be used
  1055. for <> (inequality).
  1056.  
  1057.     There also exists a number of reserved symbol names. Unlike all
  1058. other symbols, they are case-insensitive:
  1059.  
  1060.     M1-M9    disassembly window markers 1-9
  1061.  
  1062.     W1    start address of upper/single disassembly window
  1063.     W2    start address of lower disassembly window
  1064.     W3    start address of memory window
  1065.  
  1066. If any address register is equal to any of these, then the relevant name
  1067. will be displayed in the register window instead of the actual address:
  1068.  
  1069.     BASEEXEC    Exec library base address
  1070.     BASEDOS    DOS library base address
  1071.     BASEGFX    Graphics library base address
  1072.     BASEINT    Intuition library base address
  1073.     BASEASL    ASL library base address
  1074.     BASEGADT    GadTools library base address
  1075.     BASEMFFP    MathFFP library base address
  1076.  
  1077. The following are only valid if a Process exists:
  1078.  
  1079.     D0-D7    current value of data registers
  1080.     A0-A7    current value of address registers
  1081.     PC    current value of program counter
  1082.     SR    current value of status register
  1083.     CCR    current value of condition codes register
  1084.     SP    current value of a7
  1085.     SEA    source effective address of instruction at PC
  1086.     DEA    destination effective address of instruction at PC
  1087.  
  1088.     INITSP    value of a7 when Process initially entered
  1089.     PROCP    address of Process's Process structure
  1090.  
  1091. If the trackdisk device has been opened (via the Functions menu), then the
  1092. following symbol name will evaluate to the address of the IOExtTD structure:
  1093.  
  1094.     IOEXTTDP
  1095.  
  1096. In addition, Disect will not allow symbol names such as 'A235768', or
  1097. 'a23ff40', since such names may be automatically created during disassembly
  1098. to file, and hence should not exist already.
  1099.  
  1100.     The following lists all the symbol names reserved for creation
  1101. of automatic program symbols for system structure data areas which have been
  1102. defined via DataStrings. Each symbol name is the base name to which an ascii
  1103. number is added. All possibilities (actually, an infinite number) of each
  1104. base name text are reserved. The macro name is the name of the macro which
  1105. is used to disassemble the whole data area during disassemble to file (note:
  1106. macros are used only if the program symbol at the start of the data area has
  1107. not been changed since the data area was defined).
  1108.  
  1109. System Structure    Base Symbol        Macro Name
  1110. ----------------    -----------        ----------
  1111.  
  1112. BB        bblock        BOOTBLOCK
  1113. BitMap        bitmap        BITMAP
  1114. BoolInfo        boolinfo        BOOLINFO
  1115. Border        border        BORDER
  1116. ColorSpec        colrspec        COLORSPEC
  1117. EasyStruct        easystru        EASYSTRUCT
  1118. ExtGadget        extgadg        EXTGADGET
  1119. ExtNewScreen    extnscrn        EXTNSCREEN
  1120. ExtNewWindow    extnwind        EXTNWINDOW
  1121. Gadget        gadget        GADGET
  1122. Hook        hook        HOOK
  1123. Image        image        IMAGE
  1124. IntuiText        intuitxt        INTUITEXT
  1125. KeyMap        keymap        KEYMAP
  1126. LH        listhead        LISTHEAD
  1127. LIB        lib        LIBRARY
  1128. LN        listnode        LISTNODE
  1129. MC        memchunk        MEMCHUNK
  1130. ME        mementry        MEMENTRY
  1131. MH        memheadr        MEMHEADER
  1132. ML        memlist        MEMLIST
  1133. MLH        minlisth        MINLISTHEAD
  1134. MLN        minlistn        MINLISTNODE
  1135. MN        message        MESSAGE
  1136. MP        messport        MESSAGEPORT
  1137. Menu        menu        MENU
  1138. MenuItem        menuitem        MENUITEM
  1139. NewGadget        newgadg        NEWGADGET
  1140. NewMenu        newmenu        NEWMENU
  1141. NewScreen        newscrn        NEWSCREEN
  1142. NewWindow        newwind        NEWWINDOW
  1143. Process        process        PROCESS
  1144. PropInfo        propinfo        PROPINFO
  1145. StringExtend    strextnd        STREXTEND
  1146. StringInfo        strinfo        STRINFO
  1147. TTextAttr        ttxtattr        TAGTEXTATTR
  1148. TagItem        tagitem        TAGITEM
  1149. Task        task        TASK
  1150. TextAttr        textattr        TEXTATTR
  1151. TextFont        textfont        TEXTFONT
  1152. TextFontExtension    tfontext        TEXTFONTEXT
  1153.  
  1154. * ------------------------------------------------------------------------- *
  1155.  
  1156. 10) MultiBin Files
  1157. ==================
  1158.  
  1159.     The 'Save MultiBin' item in the 'Project' menu allows a single
  1160. binary file to be created which consists of more than one block of memory.
  1161. The item will open a request window which contains a list of entered address
  1162. ranges, string gadgets for entering address ranges, and a couple of gadgets
  1163. at the bottom of the window.
  1164.     The 'SegList' gadget allows a memory-resident SegList to be
  1165. used to automatically define the address ranges to be saved. By entering
  1166. the start address of the first hunk in memory into the string gadget next
  1167. to the 'SegList' gadget, and then clicking on the 'SegList' gadget, Disect
  1168. will scan the SegList, and store the start and end addresses of each hunk
  1169. in the SegList. Be careful! The address to be entered as the start address
  1170. of the first hunk should be the address at which the PC begins when the
  1171. SegList is executed (the SegList is immediately before this address in
  1172. memory). Note that using the seglist gadget will cause the two longs before
  1173. each hunk to be saved in the MultiBin file. Whenever you save a MultiBin by
  1174. entering the address ranges yourself, do not forget to account for these
  1175. longs (since they may be referenced by the Process).
  1176.     There is also a check gadget which will force the file which is
  1177. saved to be pure binary. In general, if you have used the 'SegList' gadget,
  1178. then this should be unchecked, since extra information is saved in the file
  1179. which enables the MultiBin file ('.mbin') to be reloaded later to the same
  1180. addresses from which each block of memory was saved, and possibly created as
  1181. a Process. This is of most use when dissecting an executable which allocates
  1182. memory, into which it decompresses the real program as a complete SegList.
  1183. By specifying the initial execution address of the first decompressed hunk,
  1184. the complete program can be saved as a MultiBin file.
  1185.     If the gadget is checked, then only the exact content of the
  1186. specified memory ranges is saved, as a binary file ('.bin'). This means that
  1187. the saved memory cannot be loaded back later to the exact addresses from
  1188. which each block was saved.
  1189.  
  1190.     The 'Load MultiBin' item in the Project menu allows a previously
  1191. saved MultiBin file to be loaded. This presents a request window which has
  1192. an 'Allocate Saved Memory' check gadget. If checked, then Disect will attempt
  1193. to load the MultiBin file to the exact addresses from which it was saved.
  1194. Alternatively, if unchecked, the file will be loaded to any available memory.
  1195.     A separate executable program called 'AllocMultiBin' allows the
  1196. required memory of a MultiBin file to be allocated. It should be used immed-
  1197. iately after re-booting your machine. It will open an ASL requester with
  1198. which you specify the MultiBin file to be loaded. If an error occurs, the
  1199. program will re-open this requester; if the file loads successfully, the
  1200. program will merely wait until you click on it's window's close gadget, and
  1201. will then free the memory used by the MultiBin file (although normally you
  1202. would NOT do this).
  1203.     Once the MultiBin file has been loaded, you should leave 'AMB'
  1204. in memory, and load Disect. Then select 'Load MultiBin' from the 'Project'
  1205. menu, select the same MultiBin file as was loaded by 'AMB', and check the
  1206. 'Allocate Saved Memory' gadget in the relevant request window. From this
  1207. window, click on the 'OK' gadget, and 'AMB' will automatically free the used
  1208. memory, then terminate, allowing Disect to load the MultiBin file to the
  1209. required memory.
  1210.  
  1211.     Also in the Save Multibin request window is an 'Add' gadget,
  1212. which will attempt to add a selected address range to the current project,
  1213. if the memory is available.
  1214.  
  1215.     As of V1.8, Disect allows a single MultiBin 'file' to consist
  1216. of more than one file, across a number of disks. This is governed by the
  1217. preference 'Max MultiBin Size'. This is only needed by floppy disk users,
  1218. (me!) since it is possible to require MultiBin files of more than 800k.
  1219. This preference is only a general limit, since Disect will not split user-
  1220. defined memory areas.
  1221.  
  1222.     In addition, it is also now possible to save the state of your
  1223. Process in a MultiBin file. This is used when dissecting games (ie: anything
  1224. which does not use the OS), since obviously any opened windows,etc cannot
  1225. be saved. Disect will save the current registers (d0-d7/a0-a7/pc/sr), the
  1226. state of the hardware monitor (without the Pre-/Post-Execute functions),
  1227. and the Process's stack. One thing to be aware of is that if the Process's
  1228. stack top address has been defined (see the section on the Hardware Monitor),
  1229. then the stack memory is not saved, since this memory will already be part
  1230. of the project memory.
  1231.  
  1232. * ------------------------------------------------------------------------- *
  1233.  
  1234. 11) Screen Icons Reference
  1235. ==========================
  1236.  
  1237.     Here is information about the icons at the top of the main
  1238. program screen, from left to right across it.
  1239.  
  1240. Unused Icon
  1241. -----------
  1242.  
  1243.     This icon is not used at present.
  1244.  
  1245. Auto-Data Icon
  1246. --------------
  1247.  
  1248.     This is a 'cycle' gadget which will be in one of four states: '-',
  1249. 'B', 'W', or 'L'. When '-', its function is disabled; otherwise, by LMB on
  1250. the mnemonic of an instruction in the disassembly window, Disect will auto-
  1251. matically define the relevant address as data (a single DC.X), which will
  1252. be either byte, word, or long. The base of the operand will be that which
  1253. is currently selected (hex, or decimal).
  1254.  
  1255. Address Stack Icons
  1256. -------------------
  1257.  
  1258.     The address stack is used in order to follow the flow of a prog-
  1259. ram. If the RMB is pressed over an address in the disassembly window, the
  1260. current window start address will be stacked, and the disassembly window will
  1261. be moved to the new address. The three icons are: retrieve last stacked
  1262. address, stack current disassembly window address, and delete last stacked
  1263. address. Note that if pressing left alt while RMB, the lower disassembly
  1264. window address will be stacked/changed.
  1265.  
  1266. INCBIN Icon
  1267. -----------
  1268.  
  1269.     This icon will access the INCBIN request. This allows you to
  1270. define data areas which are to be disassembled using an INCBIN assembler
  1271. directive. In order to define an area, you simply enter the start and end
  1272. addresses of the area, and, if these are valid, Disect will then ask you to
  1273. select the file to save the binary area as. If the file is written ok, then
  1274. the INCBIN area will be defined.
  1275.     You can select an existing INCBIN area by LMB in the address
  1276. ranges list window. In order to delete an INCBIN area, you select it, then
  1277. enter NULL strings for the start and end addresses (ie: empty the string
  1278. gadget, and press 'Enter'). An INCBIN area may be unselected by pressing
  1279. the RMB.
  1280.     The 'Save' gadget is used in order to re-save, or rename, an
  1281. existing INCBIN area's binary file. This is only achieved by selecting
  1282. an INCBIN area first.
  1283.  
  1284.     The 'ILBM' gadget will open the ILBM request window. This allows
  1285. a selected INCBIN area to be saved as an IFF ILBM file. The window contains
  1286. two string gadgets to allow the size of the ILBM to be specified in pixels,
  1287. a cycle gadget to select the depth of the ILBM (up to 6 bitplanes), two check
  1288. gadgets to select the view modes (hi-res/interlace), and six bitplane-select
  1289. gadgets. These are used to select which bitplanes a selected INCBIN area
  1290. contains. You can either specify that the INCBIN area contains a single
  1291. bitplane, in which case you would click on the relevant bitplane gadget.
  1292. Alternatively, you can specify that the INCBIN contains all of the required
  1293. bitplanes as defined by the currently selected ILBM depth. In this case, you
  1294. merely click on the 'All Planes' gadget at the bottom of the window. When
  1295. a bitplane has been defined, its gadget will contain the number of the bit-
  1296. plane (1-6). If you click on the gadget again, it will cycle through the
  1297. characters 'S', 'C', and '-'. These represent a fully set or a fully clear
  1298. bitplane, and an undefined bitplane, respectively. The 'New' gadget will
  1299. erase the current bitplane definitions, allowing a new selection to be made.
  1300.  
  1301. WorkBench Icon
  1302. --------------
  1303.  
  1304.     This allows the workbench screen to be opened/closed.
  1305.  
  1306. Arrow Icons
  1307. -----------
  1308.  
  1309.     The upper pair of left and right arrow icons can be used to move
  1310. the upper disassembly window; the lower pair are for the lower disassembly
  1311. window (if this is open). By also pressing the right ALT key, either pair
  1312. can be used to move the memory window.
  1313.  
  1314. * ------------------------------------------------------------------------- *
  1315.  
  1316. 12) Keyboard Reference
  1317. ======================
  1318.  
  1319.     This section contains general program information, related to
  1320. the keys which invoke each feature of Disect. The complete list is below:
  1321.  
  1322. Windows    Cursor Keys        Move upper disassembly window
  1323. -------
  1324.     & LEFT ALT        Move lower disassembly window
  1325.     & RIGHT ALT        Move memory window
  1326.     & SHIFT        Move window fast
  1327.  
  1328.     A    {LEFT ALT}    Define disassembly window address
  1329.  
  1330.     F1-F9    {LEFT ALT}    Go to disassembly window marker
  1331.     SHIFT F1-F9    {LEFT ALT}    Define disassembly window marker
  1332.  
  1333.     F10    {LEFT ALT}    Retrieve last address stack entry
  1334.  
  1335.     ESCAPE        Refresh all windows
  1336.     +        Swap both disassembly window addresses
  1337.  
  1338.     \        Address/Offset display mode
  1339.     TAB        Single/double disassembly window
  1340.     QUOTE (above TAB)    Change number base (hex/decimal)
  1341.  
  1342.     Y        Move disassembly window to previous addr
  1343.     U        Move disassembly window to next address
  1344.     O        Move disassembly window after data area
  1345.  
  1346. Functions    F        Search memory
  1347. ---------    G        Continue search
  1348.     W        Fill memory
  1349.     Q        Copy memory
  1350.     S        Display symbols
  1351.     D        Disassemble to file
  1352.     I        Display information
  1353.     H        Display processor history
  1354.     M        Display memory dump
  1355.     Z        Evaluate expression
  1356.     X        DataStrings (see section 7)
  1357.     P        Dummy symbol selection
  1358.  
  1359.     DEL        Display preferences
  1360.     HELP        Display resident SysSymbol preferences
  1361.  
  1362.     ESCAPE        Abort search/disassemble to file
  1363.  
  1364. Process    E        Execute instruction (whole of JSR/BSR)
  1365. -------    T        Trace instruction (stops inside JSR/BSR)
  1366.  
  1367.     C        Breakpoint after PC & resume
  1368.     V        Breakpoint at PC DEA & resume
  1369.     N        Next instruction (without execute)
  1370.  
  1371.     K        Kill Process
  1372.     B        Define breakpoint
  1373.     L        Kill breakpoints
  1374.  
  1375.         DISASSEMBLY WINDOW ADDRESS (A)
  1376.         ==============================
  1377.  
  1378.     This opens a window through which to input the required address.
  1379. If the left alt key is pressed with the 'A' key, then the input will be used
  1380. to define the lower disassembly window address.
  1381.  
  1382.         DISASSEMBLY WINDOW MARKER (F1-F9)
  1383.         =================================
  1384.  
  1385.     With the shift key, keys F1 to F9 will define disassembly window
  1386. markers 1 to 9 at the current disassembly window address. To delete a marker,
  1387. both keys can be pressed a second time. Without the shift key, the disass-
  1388. embly window will be moved to the address of the selected marker. If the left
  1389. alt key is also pressed, then the lower disassembly window will be used.
  1390.  
  1391.         RETRIEVE STACKED ADDRESS (F10)
  1392.         ==============================
  1393.  
  1394.     Key F10 will retrieve the last stacked address and move the dis-
  1395. assembly window to it. Again, left alt can also be pressed to move the lower
  1396. disassembly window.
  1397.  
  1398.         REFRESH MAIN WINDOWS (ESCAPE)
  1399.         =============================
  1400.  
  1401.     As well as refreshing all windows in the main program screen,
  1402. the escape key will, if a Process exists, move the (upper) disassembly window
  1403. to the current PC address (if this address is not visible in a disassembly
  1404. window).
  1405.  
  1406.         MOVE TO PREVIOUS ADDRESS (Y)
  1407.         ============================
  1408.  
  1409.     This will move the disassembly window to the previous logged
  1410. address from the first logged address in the disassembly window. Left alt
  1411. will select the lower disassembly window.
  1412.  
  1413.         MOVE TO NEXT ADDRESS (U)
  1414.         ========================
  1415.  
  1416.     This will move the disassembly window to the next logged address
  1417. from the first logged address in the disassembly window. Left alt will select
  1418. the lower disassembly window.
  1419.  
  1420.         MOVE AFTER DATA AREA (O)
  1421.         ========================
  1422.  
  1423.     This will move the disassembly window to the address after the
  1424. first logged data address in the disassembly window. This is useful in order
  1425. to pass large (uniform) data areas.
  1426.  
  1427.         SEARCH MEMORY (F,G)
  1428.         ===================
  1429.  
  1430.     Key 'F' will open the Search Memory request window, with which
  1431. you can define the ranges of memory to be searched, the type of search data,
  1432. and the data to be searched for.
  1433.     At the top of the window are two string gadgets to input the
  1434. start and end addresses (inclusive) of a range. You should input the start,
  1435. and then the end, after which, if the range is ok, the address range will be
  1436. stored. Note that you may not enter zero as an address. The current ranges
  1437. are displayed in a window below these gadgets. To the right of this window
  1438. are gadgets to scroll through the list of address ranges. This list will be
  1439. initialised to contain the start and end addresses of any loaded project
  1440. memory. If you LMB on any address range, it will be selected, and can then
  1441. be changed. If you select a range, then enter no input for the start and end
  1442. addresses, the range will be deleted from the list. The RMB can be pressed to
  1443. un-select a selected address range. Note that this info applies to all other
  1444. windows where address ranges have to be specified. 
  1445.     The gadgets at the bottom of the window are used to select the
  1446. type of search. This may be byte, word, long, ASCII, or source. The string
  1447. gadget allows input of the search data. For byte/word/long, this must be a
  1448. sequence of expressions, with a comma to separate each parameter. For ASCII/
  1449. source, the text string entered is the search data. Note that ASCII will
  1450. search memory for a text string, while source will actually disassemble the
  1451. specified address ranges, and compare the resulting source with the input
  1452. text. Obviously, searching for source is slower. The case gadget allows you
  1453. to specify whether to ignore case when searching for ASCII/source. If check-
  1454. ed, then Disect will use case-sensitive search; if unchecked, then case will
  1455. be ignored.
  1456.     If searching for byte/word/long, you may enter a single '?' char-
  1457. acter instead of an expression, in order to specify that a search-element is
  1458. unknown. For example, if you entered 32,"A",?,16 for a byte search, then the
  1459. following would be successfully matched: 32,65,46,16 and 32,65,12,16... etc
  1460. When searching for ASCII/source, the '?' character may be used in the same
  1461. way. In order to specify a search for a '?' character, you must enter '??'
  1462. instead. When searching for ASCII or source, any number of spaces input as
  1463. the search data will be matched to any number of spaces (or tabs) during the
  1464. search.
  1465.     Key 'G' will continue a search which has been halted due to the
  1466. search data being found. If searching for byte/word/long or ASCII data, then
  1467. Disect will move the memory window (screen lower right) to the address where
  1468. the search data has been found. If searching for source, then the (upper)
  1469. disassembly window will be moved instead.
  1470.     Note that no checks are performed on the memory areas: if you
  1471. (accidentally?) read from hardware registers, etc, you'll probably regret it...
  1472.     An alarm sound will begin whenever the search data is found, or
  1473. when the search ends (data not found).
  1474.     In order to specify the end of an address range, it is possible
  1475. to enter the following into the 'End' string gadget:
  1476.  
  1477.     =    specifies an address range of a single byte (ie: the
  1478.         end address is the same as the start address) - most
  1479.         useful for Fill Memory (!)
  1480.  
  1481.     +X    specifies an address range of (X+1) bytes (ie: the
  1482.         end address is the start address + X; 'X' can be
  1483.         any valid expression)
  1484.  
  1485.     ,X    specifies an address range of X bytes; 'X' can be
  1486.         any valid expression
  1487.  
  1488. This is possible in all request windows which allow input of an address
  1489. range. (Search Memory/Fill Memory/Copy Memory/INCBIN/Load Memory/Save Binary/
  1490. Disassemble To File)
  1491.  
  1492.         FILL MEMORY (W)
  1493.         ===============
  1494.  
  1495.     This opens the Fill Memory request window, which is similar to
  1496. Search Memory (above). The fill data type may be byte, word, long, or ASCII.
  1497. Note that no checks are performed on the memory areas: if you (accidentally?)
  1498. write to hardware registers, etc, you'll probably regret it...
  1499.  
  1500.         COPY MEMORY (Q)
  1501.         ===============
  1502.  
  1503.     A window will open, allowing you to specify the start and end
  1504. addresses of the source memory area, and the start address of the destination
  1505. memory area. These two areas may overlap without any corruption occurring.
  1506. Note that no checks are performed on the memory areas: if you (accidentally?)
  1507. write to hardware registers, etc, you'll probably regret it...
  1508.  
  1509.         DISPLAY SYMBOLS (S)
  1510.         ===================
  1511.  
  1512.     This will open a window via which a list of all current user
  1513. symbols is displayed. At the window top is displayed the total number of
  1514. program and constant symbols. The gadgets at the bottom of the window allow
  1515. selection of whether to list program, constant, variable, or unused symbols,
  1516. and the order in which to list the symbols (either alphabetically, or by
  1517. increasing symbol value - NOTE that to resort the symbol list, you must
  1518. also press the RMB).
  1519.     The next two gadgets allow you to delete or rename a selected
  1520. symbol. A symbol may be selected by LMB on it. Once a symbol has been
  1521. deleted, it cannot be retrieved. To rename a symbol, you should select it,
  1522. press the 'Rename' gadget, enter the new name into the string gadget which
  1523. is automatically activated, then press Enter.
  1524.     There is also another gadget, 'VM'. This allows a constant symbol
  1525. to be changed to a variable symbol, and vice versa. See 'Process Variables
  1526. Memory' for more info.
  1527.     As of V1.2, if you LMB on a program symbol which has already
  1528. been selected, then the symbol window will be closed, and the (upper)
  1529. disassembly window will be moved to the address of the symbol.
  1530.     As of V1.3, if you press a letter key (with or without a shift
  1531. key), or the ".", or "_" keys, then, if the symbols have been sorted alpha-
  1532. betically, the window will move to the first symbol beginning with that
  1533. character.
  1534.  
  1535.         DISASSEMBLE TO FILE (D)
  1536.         =======================
  1537.  
  1538.     Use of this feature is described in the tutorial (above); here is
  1539. some specific information. 
  1540.  
  1541.     The disassembly process occurs in two passes. On the first pass,
  1542. Disect disassembles the required address ranges internally, creating a list
  1543. of all referenced addresses which have not had a program symbol created for
  1544. them, a list of all required system symbols, and a list of all required user
  1545. symbols. Any immediate long numbers which lie within the disassembly address
  1546. range(s) which have not been replaced by a symbol are also checked for.
  1547.  
  1548.     Also, during the first pass, Disect performs checks for any local
  1549. program symbol references across the bounds of a global, For example:
  1550.  
  1551.     some_sr    bsr    .do_it
  1552.         rts
  1553.     another_sr    bsr    elsewhere
  1554.     .do_it    jsr    miles_away
  1555.  
  1556. If any such references are found, Disect will move the upper disassembly
  1557. window to the reference of the local program symbol, and the lower window
  1558. to the address of it. Disassembly to file will be abandoned.
  1559.  
  1560.     Disect will also warn you of any references to address which lie
  1561. within project memory range, but which are outside the disassembly range. If
  1562. one is found, a request window is opened which contains three gadgets:
  1563.  
  1564. 'Ignore' will resume disassembly, and cause the referenced address to be
  1565. stored in a permanent list so that if the address is referenced again (either
  1566. during the current, or any subsequent, disassemble to file), then Disect will
  1567. know not to bother telling you about it. The item 'Clear External Address
  1568. List' in the functions menu will erase the current list of these addresses.
  1569.  
  1570. 'Ignore All' will resume disassembly, and Disect will not inform you of any
  1571. external referenced addresses.
  1572.  
  1573. 'Quit' will...
  1574.  
  1575.     On the second pass, the disassembly occurs again; this time the
  1576. program and support source files are created. Now, any address references for
  1577. which no program symbol exists will have automatic symbols written for them.
  1578. For example, the following code:
  1579.  
  1580. 0000675372        lea    683208,a0
  1581.  
  1582.     ~    ~    ~
  1583.     ~    ~    ~
  1584.  
  1585. 0000683208        DC.W    10
  1586.  
  1587. would be disassembled as:
  1588.  
  1589.         lea    A683208,a0
  1590.  
  1591.     ~    ~    ~
  1592.     ~    ~    ~
  1593.  
  1594.     A683208    DC.W    10
  1595.  
  1596. After the whole disassembly is complete, there may still be some referenced
  1597. addresses which were not disassembled directly. For example:
  1598.  
  1599. 0000675372        move.w    683208,d0
  1600.  
  1601.     ~    ~    ~
  1602.     ~    ~    ~
  1603.  
  1604. 0000683206    data_table    DC.L    10
  1605. 0000683210        DC.L    20
  1606.  
  1607. Here, the first line would have been disassembled containing 'A683208', but
  1608. there would be no program symbol of this name. Instead, any missing address
  1609. references will be output to the end of the program file, by offsetting them
  1610. from the previous global program symbol. As an example, the code above would
  1611. result in:
  1612.  
  1613. A683208    EQU    data_table+2
  1614.  
  1615.     If Disect finds a data area where all bytes are NULL, instead of
  1616. creating lots of 'DC.X 0' source, Disect will convert the source to a single
  1617. line of 'DCB.X n', where n=the required number of bytes/words/longs. This
  1618. will not occur if the first line of the data area (ie:the only logged address
  1619. of the data area) has had it's DC.X operand (a zero!) replaced with a symbol,
  1620. or if the line has a line comment.
  1621.  
  1622.     During disassembly to file, Disect will concatenate multiple
  1623. lines of DC.B, DC.W, or DC.L statements to form (much) fewer lines of source.
  1624. Also, when outputting system or user constant EQUs, Disect will group them
  1625. using their prefix, in numeric order. For example:
  1626.  
  1627. SYMB_FIRST    EQU    -32
  1628. SYMB_SECOND    EQU    0
  1629. SYMB_FOURTH    EQU    $10
  1630.  
  1631.     The disassemble to file request window also contains gadgets:
  1632.  
  1633. 'Project' will define the disassemble address range list to match the current
  1634. project address ranges.
  1635. 'Clear' will clear the address range list.
  1636. 'Load' and 'Save' allow a ('.dfr') ascii file to be loaded/saved to be used
  1637. as the address range list.
  1638.  
  1639.     And last, but not least, any defined disassemble to file address
  1640. ranges will be displayed in the disassembly window as background colour 3
  1641. (blue, if you've not changed your WB prefs).
  1642.  
  1643.         DISPLAY INFORMATION (I)
  1644.         =======================
  1645.  
  1646.     The displayed information contains the number of logged program
  1647. addresses, and the number of program and constant user symbols. Below this
  1648. is displayed the address range and size of each project memory area, with the
  1649. type of the memory (C=chip, F=fast, P=public). 
  1650.  
  1651.         DISPLAY PROCESSOR HISTORY (H)
  1652.         =============================
  1653.  
  1654.     After any instruction is traced or executed (or skipped via key
  1655. 'N' - see below), or whenever an active Process reaches a breakpoint, or
  1656. whenever an exception occurs, the current processor state is stored. This
  1657. information is accessed via the processor history display. The most recent
  1658. entry is displayed in the lower window, with previous entries above. The
  1659. display of register contents is in hex, although by LMB on the digits of a
  1660. number, its value is displayed in denary in the small box in the top left of
  1661. the request window. The thing to note is that for any entry, the register
  1662. values represent the values after executing the previous instruction, while
  1663. the PC, SEA/DEA and instruction disassembly represent the next instruction
  1664. to be executed.
  1665.  
  1666.         DISPLAY MEMORY DUMP (M)
  1667.         =======================
  1668.  
  1669.     This opens a large memory dump window, the start address of which
  1670. will be initialised to the current address of the first line of the small
  1671. memory window in the main program screen. The window may be moved around
  1672. memory using the cursor keys (and the shift key to move it faster). A string
  1673. gadget in the window top left allows a new start address to be input. The
  1674. base of the address digits will be the same as the currently selected base
  1675. for the main program screen (denary or hex). Note that the ASCII display will
  1676. show the character '·' for any memory locations for which the content is out-
  1677. side the ASCII range of 32 to 127.
  1678.     By LMB on a memory location's content, Disect will display the
  1679. denary values of the byte, word, and long starting at that address. The cycle
  1680. gadget in the window allows you to select whether to display the B/W/L as
  1681. signed or unsigned denary.
  1682.     RMB on a memory location's content will cause the Base Offset
  1683. Address to be defined at the address of the selected byte. The preferences
  1684. will also be updated to display offsets instead of addresses.
  1685.  
  1686.         EVALUATE EXPRESSION (Z)
  1687.         =======================
  1688.  
  1689.     This opens a window containing a string gadget for input of an
  1690. expression. The current string content will be evaluated whenever Enter is
  1691. pressed. Expression results are displayed as unsigned denary, signed denary
  1692. (if the sign bit is set; ie, either bit 31, bit 15, or bit 7 depending upon
  1693. whether the value is in the long, word, or byte value range - try it out with
  1694. results of 4294967295, 65535, and 255 - you'll see what I mean!), hex, ASCII,
  1695. binary, and any program symbol if one is found of the result value.
  1696.  
  1697.         DUMMY SYMBOL SELECTION (P)
  1698.         ==========================
  1699.  
  1700.     This will request a single expression, the result of which will
  1701. be passed to the Symbol Selection Window. This allows you to select symbol(s)
  1702. in the usual way, for any number, although obviously no information will be
  1703. stored about your selection. When a symbol match occurs, the window will
  1704. display the 'New', 'Zero', and 'Quit' gadgets as usual, but the 'Confirm'
  1705. gadget will be replaced with a 'Comment' gadget. If this is selected, then
  1706. the Symbol Selection window will close, and a message will appear in the
  1707. main window. By LMB on the mnemonic of an instruction within the disassembly
  1708. window, the actual text of the selected symbols can be automatically stored
  1709. as a line comment for the instruction. The comment text will automatically
  1710. have the chars "*!*" added to the end, allowing such comments to be found
  1711. in disassembled a source file, using a text editor. As an example, if a
  1712. program routine allocated temporary space for definition of a NewWindow
  1713. structure:
  1714.  
  1715.     link    a5,#-48
  1716.  
  1717. Although you cannot replace '-48' with 'nw_SIZE', by making a dummy selection
  1718. for a value of '48', the Symbol Selection window will list 'nw_SIZE'. By
  1719. selecting this, then the 'Comment' gadget, the symbol text is stored as
  1720. a comment (with a marker allowing it to be found and edited, when a source
  1721. file has been disassembled).
  1722.  
  1723.         DISPLAY PREFERENCES (DEL)
  1724.         =========================
  1725.  
  1726.     This window allows selection of program preferences. The gadgets
  1727. at the bottom of the window allow the last saved preferences to be loaded,
  1728. the current settings to be saved, the current settings to be used, and the
  1729. previous settings to be restored (ignoring any changes since window opened).
  1730. The preferences are as follows:
  1731.  
  1732. AutoSymbol    This enables/disables automatic symbol replacement. This means
  1733.     that as addresses are disassembled via display of the disassembly
  1734.     window(s), any address which has not been replaced by a program
  1735.     symbol will automatically be replaced by any program symbol which
  1736.     has a matching value. In addition, if the 'hardware' directory
  1737.     SysSymbols are resident, then any references to chip registers
  1738.     or CIA addresses will also be automatically replaced. This also
  1739.     includes the bit number of a btst/bset/bclr/bchg when the DEA
  1740.     is any of CIAA_PRA, CIAB_PRA, or CIAB_PRB. Also, any instructions
  1741.     of the form 'jsr dd(a6)' will have their displacements replaced
  1742.     with _LVO symbols, if a6 contains the base address of any of the
  1743.     libraries: Exec, DOS, Graphics, Intuition, ASL, MathFFP, GadTools.
  1744.     This only occurs if a Process exists, and will take place when
  1745.     the instruction at the PC is a jsr.    This preference also controls
  1746.     Process Variables Memory references    symbol replacement (see
  1747.     elsewhere).
  1748.  
  1749. Auto 0(Ax)    This enables/disables automatic display of a '0' before '(Ax)'
  1750.     for the address-register-indirect addressing mode. This is useful
  1751.     because some assemblers will automatically optimise address-
  1752.     register-indirection-with-displacement references to ARI if the
  1753.     displacement is zero. This feature allows a '0' to be displayed
  1754.     so that it can then be replaced with a symbol (for example:
  1755.     exec/lists.i 'LH_HEAD' which has the value 0).
  1756.  
  1757. Case    This allows selection of upper or lower case for disassembly.
  1758.     Note that assembler directives will always be disassembled as
  1759.     upper case.
  1760.  
  1761. Base    This allows selection of denary or hex for disassembly.
  1762.  
  1763. A7/SP    This allows selection of 'a7' or 'sp' for disassembly.
  1764.  
  1765. Local    This allows selection of the character to prefix local program
  1766.     symbols. This may be either '.' or '_'.
  1767.  
  1768. PSymb ':'    This enables/disables automatic display of a ':' character after
  1769.     program symbols in the program symbol field of a line.
  1770.  
  1771. SAD    This enables/disables automatic display of program symbols
  1772.     instead of addresses in such places as register values, memory
  1773.     dump addresses, addresses in request windows, etc.
  1774.  
  1775. Offset    This allows addresses to be displayed as hunk/project memory
  1776.     start offsets instead. If selected, any address which lie within
  1777.     the project memory range will be displayed as, for example,
  1778.     "0:256", where 0 is the hunk number, and 256 is the offset.
  1779.     In the disassembly window, this will be enclosed in "[]" chars.
  1780.     In addition, you may define a base offset address (using an item
  1781.     from the preferences menu). If you do this, then ALL addresses,
  1782.     not just addresses in project memory range, will be displayed
  1783.     as offsets relative to the base address, eg: "-$32", or "[+146]".
  1784.     A small request window is used to define the base address. This
  1785.     contains a string gadget for input of the address, and a check
  1786.     gadget to enable/disable the current base address.
  1787.  
  1788. Comment DS    This enables/disables automatic line comments when Disect defines
  1789.     a data area using a system DataString.
  1790.  
  1791. Erase DSC    This enables/disables automatic removal of DataString-defined
  1792.     line comments after symbolic replacement of a number.
  1793.  
  1794. Blank Lines    This preference enables/disables automatic blank lines. If used,
  1795.     Disect will add blank lines after any of these instructions:
  1796.         DBcc, Bcc, JMP, JSR, RTD, RTE, RTR, RTS.
  1797.  
  1798. Process Mem    This informs Disect whether or not to install a memory monitor
  1799.     when a Process is created (not if a Process is grabbed). If one
  1800.     is installed, then when the Process terminates, a request window
  1801.     will open to list any unfreed memory allocations. Disect will
  1802.     display the start and end addresses of each memory block, as well
  1803.     as the size. Also displayed will be either: 'SELF' if the memory
  1804.     was allocated by a function within the Process; the name of the
  1805.     library containing the function which allocated the memory (if
  1806.     this can be determined); 'ROM' if the memory was allocated by a
  1807.     ROM function which could not be named as a library. If the alloc-
  1808.     ator cannot be determined, then the return address when AllocMem()
  1809.     was called will be displayed. Any unfreed memory which is shown
  1810.     as being self-allocated is automatically freed by Disect.
  1811.     The memory monitor is installed by calling Exec.SetFunction() for
  1812.     the functions AllocMem() and FreeMem(). Before doing this, Disect
  1813.     first checks the current destination addresses of their JMP inst-
  1814.     ructions (the jump table just below ExecBase). If either of these
  1815.     instructions do not jump to a ROM address, then Disect will not
  1816.     attempt to install the memory monitor. Note that it is necessary
  1817.     to install a memory monitor for certain features of the Auto
  1818.     Trace mode (see elsewhere).
  1819.  
  1820. MaxMBinSize    This allows you to specify the maximum size of each file of a
  1821.     MultiBin file. See the specific section about MultiBin files for
  1822.     more info.
  1823.  
  1824. MaxSourceSz    This allows you to specify the maximum size of a source file
  1825.     when disassembling to file.
  1826.  
  1827.         DISPLAY SYSSYMBOL PREFERENCES (HELP)
  1828.         ====================================
  1829.  
  1830.     As mentioned above, this window allows selection of resident
  1831. SysSymbol (system symbol) data. The four gadgets at the bottom of the window
  1832. work as for Preferences (above). Response to changing the preferences occurs
  1833. when the window is closed. Note that you cannot remove a directory's data
  1834. from memory if it is used (ie: if any of it's symbols are used by the project
  1835. in memory). The digits after each directory's name represent the size of the
  1836. data file. It's best not to load data without using it, since any resident
  1837. data is checked in such circumstances as expression evaluation, checking if
  1838. a symbol name is used already, etc.
  1839.  
  1840.         EXECUTE INSTRUCTION (E)
  1841.         =======================
  1842.  
  1843.     Only available if a Process exists, this will execute the single
  1844. instruction at the PC. Note that the whole of a JSR/BSR will be executed, ie:
  1845. the Process will be suspended at the address after the JSR/BSR instruction.
  1846. Any permanent breakpoint at the PC will be ignored.
  1847.     One small point to add is that it is possible to execute PC-
  1848. relative JSR/BSR instructions which use 68020 specific address modes, even
  1849. with a pre-68020 processor. (The reason: JSR/BSR instructions are buffered
  1850. before execution, so therefore PC-relative modes get changed to absolute-
  1851. long address mode. In the case of BSR, the instruction is changed to JSR
  1852. absolute-long, so therefore any BSR which uses an 020 mode is permitted
  1853. on a pre-68020 processor. If you didn't follow that, it does not matter...)
  1854.  
  1855.         TRACE INSTRUCTION (T)
  1856.         =====================
  1857.  
  1858.     This will trace the instruction at the PC, if a Process exists.
  1859. This means that if the instruction is a JSR/BSR, then the Process will be
  1860. suspended at the first instruction of the subroutine which is called. Any
  1861. permanent breakpoint at the PC will be ignored. In addition, if you trace
  1862. a JSR or a BSR, then any form of breakpoint at the PC is ignored.
  1863.  
  1864.         RESUME PROCESS (Process Menu)
  1865.         =============================
  1866.  
  1867.     This will activate a suspended Process, hence it and Disect will
  1868. be running 'simultaneously' (multi-tasking). Any permanent breakpoint at the
  1869. PC will be ignored during the (first) execution of the instruction there.
  1870.  
  1871.         BREAKPOINT AFTER PC (C)
  1872.         =======================
  1873.  
  1874.     This will define a stop breakpoint after the instruction at the
  1875. PC, and resume the Process. This is useful if the instruction is a DBcc/Bcc,
  1876. since an entire program loop may be executed, and the Process suspended after
  1877. the loop has been completed the required number of times. A permanent break-
  1878. point at the PC will be ignored during the (first) execution of the instruc-
  1879. tion there.
  1880.  
  1881.         BREAKPOINT AT DEA (V)
  1882.         =====================
  1883.  
  1884.     This will define a stop breakpoint at the DEA of the instruction
  1885. at the PC, and resume the Process. This, again, is useful for executing
  1886. program loops, but ones where the exit point of a loop does not sequentially
  1887. lead to the next instruction. Any permament breakpoint at the PC will be
  1888. ignored during the (first) execution of the instruction there.
  1889.  
  1890.         NEXT INSTRUCTION (N)
  1891.         ====================
  1892.  
  1893.     This will move the PC to the next instruction without executing
  1894. the current one. Any breakpoint at the PC will be ignored.
  1895.  
  1896.         KILL PROCESS (K)
  1897.         ================
  1898.  
  1899.     This will kill a suspended Process. This is achieved by changing
  1900. the Process's stack pointer to the address it was when the Process began,
  1901. moving the PC to an RTS instruction, and resuming the Process.
  1902.     Whenever a Process terminates, if any data exists, you will be
  1903. given a chance to save it before it is (automatically) erased.
  1904.  
  1905.         DEFINE BREAKPOINT (B)
  1906.         =====================
  1907.  
  1908.     This allows a breakpoint to be defined. The program requests the
  1909. address of the breakpoint, and it's type. This may be permanent, conditional,
  1910. stop, or count. Conditional breakpoints also require an expression. This will
  1911. be evaluated after input, and if no error occurs, the breakpoint will be
  1912. defined. Whenever execution of an active Process reaches a conditional break-
  1913. point, then its expression will be evaluated. If the result is not zero, then
  1914. the breakpoint is removed, and the Process suspended. If the result is FALSE
  1915. (equal to zero), then the Process is resumed. If the expression cannot be
  1916. evaluated (for example, due to an unknown symbol name), then the Process will
  1917. be suspended, with the breakpoint intact, and an error message displayed.
  1918.     Count breakpoints have associated with them a long counter. When-
  1919. ever the breakpoint is reached, the counter is decreased. If it reaches zero,
  1920. then the breakpoint is removed, and the Process suspended, otherwise the
  1921. Process will resume.
  1922.     Stop breakpoints are simple breakpoints which will cause the
  1923. Process to be suspended. They are removed whenever encountered. Stop break-
  1924. points are in fact count breakpoints with an initial counter value of 1.
  1925.     Note that an alternative method of defining a breakpoint is to
  1926. LMB on the address digits in the disassembly window, at the address where the
  1927. breakpoint is required.
  1928.  
  1929.     When an active Process reaches a breakpoint, if the breakpoint
  1930. causes the Process to be suspended, then the PC will be at the address of
  1931. the breakpoint, and the instruction there will not yet have been executed.
  1932. Whenever an exception occurs, the PC will either be at the address of the
  1933. instruction which caused it, or at the address of the next instruction.
  1934.  
  1935.         KILL BREAKPOINTS (L)
  1936.         ====================
  1937.  
  1938.     This will remove all currently-defined breakpoints. It works even
  1939. when the Process is active.
  1940.  
  1941. * ------------------------------------------------------------------------- *
  1942.  
  1943. 13) Mouse Reference
  1944. ===================
  1945.  
  1946.     This section describes the areas of the main program screen which
  1947. will respond to LMB or RMB activity.
  1948.  
  1949. Disassembly Window
  1950. ------------------
  1951.  
  1952.     1) Address Digits LMB at left of window to define breakpoint. #
  1953.     2) Address Digits RMB at left of window to remove breakpoint.
  1954.     3) Program Symbol area LMB define program symbol for the address.
  1955.     4) Program Symbol area RMB on a local moves window to its global.
  1956.     5) Mnemonic LMB to access address functions.
  1957.     6) Mnemonic RMB to move PC to instruction.
  1958.     7) Number LMB in instruction operands to replace with symbol(s).
  1959.     8) Program Address RMB in instruction operands to stack current
  1960.         address and move window to new address. *
  1961.     9) Displacement RMB in instruction operands to stack current
  1962.         address and move window to EA, eg: 32(a6). *
  1963.  
  1964. # Right ALT may also be pressed, which will move the memory window to the
  1965.   address instead of defining a breakpoint.
  1966.  
  1967. * Left ALT may also be pressed to move the lower disassembly window; right
  1968.   ALT may be pressed to move the memory window (in which case, no address
  1969.   will be stored on the address stack).
  1970.  
  1971. PC/SR/EA Window
  1972. ---------------
  1973.  
  1974.     1) PC Value Digits LMB to define new PC value.
  1975.     2) SR Value Digits/Flags Text LMB to define new SR value.
  1976.     3) SEA/DEA Text LMB to select register zoom lock.
  1977.     4) SEA/DEA Value Digits RMB to display previous program symbol.
  1978.  
  1979.  
  1980. Register Window
  1981. ---------------
  1982.  
  1983.     1) D0-D7/A0-A7 Value Digits LMB to define new register value.
  1984.     2) D0-D7/A0-A7 Text LMB to select register-zoom lock.
  1985.     3) D0-D7/A0-A7 Text LMB and CTRL key to define an address
  1986.         constant symbol (see section 5).
  1987.  
  1988. Memory Window
  1989. -------------
  1990.  
  1991.     1) Address Digits LMB to define new memory display address.
  1992.  
  1993. The following request windows also have responses to mouse buttons:
  1994.  
  1995. Memory Dump
  1996. -----------
  1997.  
  1998.     1) Memory content LMB to display byte/word/long value as denary.
  1999.     2) Memory content RMB to define base offset address.
  2000.  
  2001. Breakpoints Window
  2002. ------------------
  2003.  
  2004.     1) Breakpoint information LMB to move (upper) disassembly window.
  2005.  
  2006. Symbol Window
  2007. -------------
  2008.  
  2009.     1) Symbol name LMB (twice) to move (upper) disassembly window.
  2010.  
  2011. * ------------------------------------------------------------------------- *
  2012.  
  2013. 14) Menu Reference
  2014. ==================
  2015.  
  2016.     This section details any program functions which are accessible
  2017. only via menus (no keyboard commands), and are not documented elsewhere.
  2018.  
  2019.         SAVE BOOT BLOCK (Project Menu)
  2020.         ==============================
  2021.  
  2022.     This allows an area of memory to be saved as a boot-block. (Very
  2023. handy for making your favourite game a little more enjoyable!). Note that
  2024. the boot-block checksum will be defined by Disect.
  2025.  
  2026.         SCAN '.GS' FILE (Project Menu)
  2027.         ==============================
  2028.  
  2029.     This allows a '.gs' file as produced by GenAm to be scanned, and
  2030. its constant symbols extracted. When doing this, if Disect finds a symbol
  2031. name which is already used (either by a system or a user symbol), then the
  2032. values of the two symbols are compared. If they both have the same value,
  2033. then the symbol from the '.gs' file is ignored. If the values differ, then
  2034. a request window will open, allowing you to either rename the symbol from
  2035. the '.gs' file (type in the new name, and press 'Enter'), or to ignore the
  2036. symbol from the '.gs' file (click on the 'Ignore' gadget). Note: it is best
  2037. to scan a '.gs' file ONLY AFTER you have already loaded any required system
  2038. symbols for your current project. This is because when SysSymbol data is
  2039. loaded, no checks occur for existing symbol names. When you later save your
  2040. '.DSCT' data, the symbols read from the '.gs' file will also be saved, so
  2041. you only need to scan a '.gs' file once.
  2042.  
  2043.         INSERT BINARY FILE (Project Menu)
  2044.         =================================
  2045.  
  2046.     This allows a binary file to be loaded into current project
  2047. memory.
  2048.  
  2049.         SEARCH FOR SYMBOL (Functions/Memory Menu)
  2050.         =========================================
  2051.  
  2052.     This allows a very fast search for the use of any system or user
  2053. symbol. After you have entered the required symbol name, if this is known by
  2054. Disect, then a search of all logged addresses is performed to see if this
  2055. symbol has been used to replace any number within the project.
  2056.  
  2057.         EQU SYMBOL DEFINITION (Functions Menu)
  2058.         ======================================
  2059.  
  2060.     This allows manual definition of a constant symbol.
  2061.  
  2062.         SET SYMBOL DEFINITION (Functions Menu)
  2063.         ======================================
  2064.  
  2065.     This allows manual definition of a constant symbol which can be
  2066. redefined later to have a different value. Quite useful when using macros
  2067. for certain things...
  2068.  
  2069.         PLAY AUDIO SAMPLE (Functions Menu)
  2070.         ==================================
  2071.  
  2072.     This opens a request window which allows specification of the
  2073. start and end addresses of an area of memory to be played as an audio sample.
  2074. Once a sample has been identified, it can be saved as a raw/binary file.
  2075.  
  2076.         OPEN TRACKDISK DEVICE (Functions Menu)
  2077.         ======================================
  2078.  
  2079.     This allows the trackdisk device to be opened (DF0:), and used
  2080. for disk IO if required by a Process. Typically, this is required when you
  2081. have loaded a boot-block, then later saved your project as a multibin file.
  2082. When this is later re-loaded, you can open the trackdisk device in order to
  2083. execute the code of the original boot block. If opened, then a reserved
  2084. symbol name becomes valid ('IOEXTTDP'), which gives the address of the
  2085. required IOExtTD structure. There is also another menu item which will
  2086. turn off the drive motor (very useful in certain circumstances).
  2087.  
  2088.     EXECUTABLE BINARY OFFSET (Functions Menu)
  2089.     =========================================
  2090.  
  2091.     This strangely-titled function has a very specific use. Suppose
  2092. you have loaded an executable file into memory, and have decided you want
  2093. to patch, for example, a NOP into address [2:$2438] (ie: the 3rd hunk, offset
  2094. $2438). What is required is to erase the project, then re-load the executable
  2095. as a binary file, so that it exists in memory as a single block of code,
  2096. which can be changed and re-saved. But! Obviously, address [2:$2438] could
  2097. be very difficult to find within this single block.
  2098.     This function solves this problem. It has two ways of being used,
  2099. depending on the type of the current loaded project. If an executable has
  2100. been loaded, you will be requested to enter a hunk number and offset, which
  2101. Disect will use to scan the original executable file on disk, in order to
  2102. display the offset into the file of the required byte.
  2103.     If a binary file has been loaded (ie: an executable file loaded
  2104. as a binary file), you will again be requested to enter a [hunk:offset], and
  2105. Disect will move the disassembly window to the required byte within memory.
  2106.  
  2107.     BREAKPOINT AT ACTIVE PROCESS PC (Process Menu)
  2108.     ==============================================
  2109.  
  2110.     This allows Disect to regain control of an active Process. In
  2111. terms of Exec task-switching, the Process will be either Wait()ing on signals
  2112. or Ready (suspended only until its next quantum). If the Process is Waiting,
  2113. then the breakpoint will be defined, but the Process will remain Waiting
  2114. until it receives a valid signal (caused by, eg: LMB on it's window), at
  2115. which point it will reach the breakpoint.
  2116.     If the Process is Ready, then the breakpoint can only be defined
  2117. if the Process's PC is within project memory range (ie: not within ROM, or a
  2118. system library, etc).
  2119.  
  2120.     Note! This function is very handy if your Process goes into an
  2121. infinite loop!!
  2122.  
  2123.     DISPLAY BREAKPOINTS (Process Menu)
  2124.     ==================================
  2125.  
  2126.     This displays any defined breakpoints: the breakpoint address, 
  2127. and breakpoint type. Permanent breakpoints are denoted by '*' and conditional
  2128. by '?'. Count and stop breakpoints have a number displayed with represents
  2129. the remaining counter value (a stop breakpoint is a count breakpoint of value
  2130. 1). Conditional breakpoints have their expressions displayed after the '?'.
  2131. By LMB on a breakpoint text line, the (upper) disassembly window can be moved
  2132. to the address of the breakpoint.
  2133.  
  2134. * ------------------------------------------------------------------------- *
  2135.  
  2136. 15) Process Variables Memory
  2137. ============================
  2138.  
  2139.     As of V1.8, if a Process exists, it is possible to define an area
  2140. of memory as variables memory which is used by the Process. This memory may
  2141. be either within the Process's memory (project memory range), or it may have
  2142. been allocated by the Process. This is most useful when dissecting a program
  2143. which references its variables using either of the addressing modes ARID
  2144. (eg: '32(a4)'), or ARIDI (eg: '16(a5,d0.w)'), since it allows references
  2145. to known variables to be automatically replaced with user-defined symbols,
  2146. as will normally occur with direct address references to logged addresses.
  2147.  
  2148.     The 'Process' menu contains an item 'Variables Memory'. This
  2149. will open a request window which contains: two string gadgets for input of
  2150. variables memory start and size; a single string gadget for input of the
  2151. address of a 'JSR _LVOAllocMem(a6)' instruction; and two more gadgets, 'Ax',
  2152. and 'Previous'.
  2153.  
  2154.     The first two string gadgets allow the variables memory area to
  2155. be specified directly, if this is known. If you enter a start address and a
  2156. size which matches the address and size of any block of memory which is known
  2157. to have been allocated by the Process, then the address of the 'JSR AllocMem'
  2158. which allocated this memory will automatically be stored in the third string
  2159. gadget. It is also possible to enter the address of a 'JSR AllocMem', from
  2160. which Disect will be able to determine the address and size of the variables
  2161. memory. The 'Previous' gadget will automatically define all three string
  2162. gadgets according to the last memory allocation made by the Process. Note
  2163. that this is only possible if a memory monitor was installed when the Process
  2164. was created (see main preferences).    The 'Ax' gadget allows you to select
  2165. which address register is to be taken as a variables memory base pointer.
  2166.  
  2167.     The purpose of this is best illustrated by example. If you were
  2168. dissecting a Process which had allocated a block of memory and stored its
  2169. address in a4, or had done 'lea [1:0],a4', and you had the following:
  2170.  
  2171.     move.b    #24,32(a4)
  2172.  
  2173. If you LMB on the '32' and replace it with a user constant symbol which you
  2174. named 'some_var':
  2175.  
  2176.     move.b    #24,some_var(a4)
  2177.  
  2178.     If the DEA is within a known variables memory area, then the
  2179. symbol 'some_var' is treated as a 'variable constant symbol'. What this means
  2180. is that whenever the PC reaches any instruction which contains either an ARID
  2181. or a ARIDI reference such as '32(a4)', then Disect will automatically replace
  2182. the '32' with the known variable symbol 'some_var'.
  2183.  
  2184.     Since it is not necessarily true that all such references are
  2185. in fact references to variables memory, Disect will only automatically
  2186. replace these when the PC is at the relevant instruction (at which time it
  2187. is possible for Disect to know for certain). So, any references which are
  2188. found which might be variables are marked with a 'V' character next to where
  2189. breakpoint markers appear. If you wish to confirm that an instruction does
  2190. in fact reference variables memory, then you simply LMB on the 'V' marker.
  2191. Incidentally, whenever a DC.L is disassembled, if there is a program symbol
  2192. which exists which matches the value of the DC.L operand, then a 'P' marker
  2193. will be displayed, which can be LMB clicked in the same way to auto-replace.
  2194.  
  2195.     All of the information contained in the Variables Memory request
  2196. window is saved as part of the DSCT data file, so that, for example, once
  2197. the 'JSR AllocMem' which allocates the variables memory has been identified,
  2198. Disect will automatically define the variables memory start and size when
  2199. this instruction is executed the next time you load the original Process (as
  2200. long as a memory monitor was installed when the Process was created).
  2201.  
  2202. * ------------------------------------------------------------------------- *
  2203.  
  2204. 16) Grabbing An Existing Process
  2205. ================================
  2206.  
  2207.     The 'Project' menu item 'Grab Process' allows an existing memory-
  2208. resident Process to be grabbed, and used as if the Process had been created
  2209. by Disect in the normal way. A request window will open, which will list
  2210. all current Processes which are waiting, either as a result of a call to
  2211. Exec Wait(), or Exec WaitPort(). To grab a Process, simply LMB on its name
  2212. to select it, then click on the 'Grab' gadget. At this point, if the Process
  2213. is no longer Waiting, then Disect will not attempt to grab it. If the Process
  2214. is still Waiting, Disect will effectively send it one of the signal(s) it is
  2215. waiting for, and the Process will resume, under control of Disect. Lovely!
  2216.  
  2217.     Also in the 'Project' menu is another item 'Ungrab Process'. This
  2218. will allow a grabbed Process to be resumed, no longer under the control of
  2219. Disect.
  2220.  
  2221.     This feature should be used with caution. It is vital that some
  2222. Processes remain functional at all times, ie: it is not safe to grab them
  2223. since their activities must not be interrupted. The only way to discover if
  2224. a Process can be safely grabbed (and ungrabbed) is to try it. Note that some
  2225. Processes can be grabbed, and only when you attempt to ungrab them will
  2226. problems occur. You have been warned...
  2227.  
  2228.     Another word of warning: a Process which has been grabbed may
  2229. have its SegList memory (the memory in which the Process resides) freed
  2230. automatically, as soon as the Process has replied to its WorkBench start-up
  2231. message. As a result, it may be unsafe to single-step the last instructions
  2232. of a Process, since the OS may free the Process's memory before the very last
  2233. instruction has been executed by Disect. As an example:
  2234.  
  2235.     bsr    close_down    ; reply to WB message
  2236.  
  2237.     moveq.l    #0,d0    ; set return code
  2238.  
  2239.     rts        ; Process terminates here !
  2240.  
  2241. If you execute (key 'E') the bsr, the Process replies to its WB start-up
  2242. message, which may cause the Process's memory to be freed. Disect will
  2243. then have a PC at the moveq.l instruction, but any operation which uses
  2244. memory (eg: opening a Disect window) may cause the content of the PC
  2245. address to become corrupt. If this occurs, then you should select the
  2246. 'Move PC To Return Code' item from the 'Process' menu. This will move
  2247. the PC to an address which is guaranteed to contain the final two
  2248. instructions in the example above.
  2249.  
  2250. * ------------------------------------------------------------------------- *
  2251.  
  2252. 17) Auto Trace Mode
  2253. ===================
  2254.  
  2255.     Hopefully, this will at times prove to be a rather useful little
  2256. feature. What it does is to automatically trace the instructions of your
  2257. Process until some certain pre-specified condition is met. In conjunction
  2258. with Disect's automatic symbol replacement (ARID hardware register, Process
  2259. variables memory references, _LVOs), it can be quite revealing! Auto-trace
  2260. mode is accessed via the 'Process' menu, which will open a request window.
  2261. This contains a 'Resume' and a 'Quit' gadget: the first will enable auto
  2262. trace mode, whilst the second will not. Note that once enabled, auto trace
  2263. mode can be disabled by pressing the 'Esc' key. Whenever you save the main
  2264. program preferences, the current auto trace mode settings and expressions are
  2265. also saved. The remaining content of the auto trace request window is roughly
  2266. divided into two.
  2267.  
  2268.     On the left, you have six check gadgets and two string gadgets.
  2269. These define the conditions which will cause auto trace mode to be disabled.
  2270. The first two check gadgets are used to define whether or not auto trace mode
  2271. is disabled whenever an instruction is reached which will attempt to perform
  2272. a word or long read/write using an odd source/destination effective address.
  2273. As with all the conditions which may disable auto trace mode, the Process
  2274. will 'suspend' before the current instruction has been executed.
  2275.  
  2276.     The third check gadget is used to disable auto trace mode when-
  2277. ever the instruction at the PC is RTS. This can be used to effectively
  2278. resume the Process until the RTS of the current function/subroutine. Note
  2279. that Disect will count how many JSR/BSR instructions are traced, in order
  2280. to know how many RTS instructions must be ignored before the actual RTS
  2281. which will disable auto trace mode is reached.
  2282.  
  2283.     The next check gadget, if checked, will cause auto trace mode
  2284. to be disabled whenever the destination effective address of an instruction
  2285. is not within 'permitted' memory. Disect considers the following to be
  2286. permitted:        
  2287.  
  2288.     1) The memory in which the Process resides.
  2289.     2) The memory in which the Process's Process STRUCTURE resides.
  2290.     3) The Process's stack.
  2291.     4) Memory used by the LIB structure of any resident library.
  2292.     5) Any memory allocated by the Process.
  2293.  
  2294. Any writes to memory allocated by the Process will only be detected as being
  2295. permitted if a memory monitor was installed when the Process was created (not
  2296. grabbed!). This option can be found in the Preferences request window. For
  2297. word or long writes to memory, Disect will also check if the address of the
  2298. last byte written is outside permitted memory.
  2299.  
  2300.     The final two check gadgets are used to enable/disable each
  2301. expression entered into the two string gadgets. If enabled, before tracing
  2302. an instruction, Disect will evaluate an expression, and will disable auto
  2303. trace mode if the result is TRUE (non-zero). Note that this is the equivalent
  2304. of placing a conditional breakpoint at every instruction of your Process
  2305. (which would be otherwise impossible), including any external libraries or
  2306. functions, including ROM (also not otherwise possible). If the expression
  2307. contains either of the reserved symbol names 'SEA' and/or 'DEA', then if
  2308. an instruction does not have a source/destination effective address, the
  2309. expression will be ignored (for that instruction only). As a result, Disect
  2310. will not allow a single expression to contain BOTH 'SEA' and 'DEA' (since
  2311. this would result in the expression being ignored for instructions which
  2312. have only a source OR a destination effective address). This is why there
  2313. are two expressions permitted: one can contain 'SEA', and the other, 'DEA'.
  2314.  
  2315.     The are other conditions which will always cause auto trace mode
  2316. to be disabled: if PC is 0 or odd; if the opcode at PC cannot be identified;
  2317. if the destination effective address is hardware register INTENA; if the
  2318. instruction at PC is privileged; or if a breakpoint is reached (if the
  2319. breakpoint would normally cause an active Process to be suspended).
  2320.  
  2321.     In the right of the auto trace request window are seven check
  2322. gadgets used to control various options. The first two tell Disect whether
  2323. or not to trace ROM functions, and any external functions (not within the
  2324. memory range of the Process, and not in ROM). Whenever a JSR/BSR instruction
  2325. is reached, Disect uses the address of the subroutine to decide if it should
  2326. be traced. If not, then the JSR/BSR instruction is executed, as occurs via
  2327. pressing key 'E' normally, hence the subroutine will execute in real-time.
  2328. Note that a JSR/BSR is treated as a call to a ROM function either if the
  2329. subroutine address is in ROM, or if the instruction at this address is a JMP
  2330. into ROM (eg: exec.library). If a function is not traced, then auto trace
  2331. mode will resume after the function has returned.
  2332.     In addition, if a JMP to a ROM/external function is reached,
  2333. (as will happen often with a Process written in 'C'), then Disect will check
  2334. the address on the top of the stack to see if it is within project memory
  2335. (it should be, since this is the rts address for the ROM/external function).
  2336. If not, Disect will disable auto-trace mode and display a message ('RTS out-
  2337. side project'). If this address is in project memory, then Disect will define
  2338. a stop breakpoint at this address, and the Process will be resumed at the JMP
  2339. instruction. When the function returns, the breakpoint will be reached, at
  2340. which point auto-trace mode will be enabled, as before.
  2341.  
  2342.     The third check gadget will enable/disable writes to the history
  2343. buffer after each instruction has been traced. Whenever a JSR/BSR is executed
  2344. (ie: not traced), then the history buffer will be written to after the JSR/
  2345. BSR has completed, the function having returned successfully.
  2346.  
  2347.     The final four check gadgets will enable/disable the refreshing
  2348. of the four main program windows after each instruction has been traced.
  2349.  
  2350.     The second item in the Process menu is 'Resume Until RTS'. This
  2351. will enable auto-trace mode, with all options disabled except 'Suspend At
  2352. RTS'. This is useful for quickly getting to the end of the subroutine in
  2353. which the PC is currently located. Note that the 'Odd SEA' and 'Odd DEA'
  2354. options for auto trace mode will be as defined via the Auto Trace Mode
  2355. request window (ie: they are not automatically disabled during Resume Until
  2356. RTS).
  2357.  
  2358.     Also in the 'Process' menu is another item 'Breakpoint After
  2359. External BSR/JSR'. If you're not interested in this then read no further...
  2360.  
  2361.     Right, the reason I did this one was as follows: when tracing
  2362. ROM functions, more specifically exec.library Wait(), auto trace mode would
  2363. be disabled at the following instruction:
  2364.  
  2365.     move.w    #$4000,$dff09a    ; disable interrupts
  2366.  
  2367. Now, we cannot possibly expect to continue auto-trace mode (take my word for
  2368. it...), so what this menu item will do is to place a stop breakpoint at the
  2369. address after the last traced internal JSR/BSR to an external function.
  2370. What this means is that somewhere within the memory range of our Process is
  2371. the following:
  2372.  
  2373.     ~    ~    ~
  2374.     ~    ~    ~
  2375.     jsr    _LVOWait(a6)
  2376.  
  2377.     ~    ~    ~
  2378.     ~    ~    ~
  2379.  
  2380. Since this is the (internal) JSR which called an external function, Disect
  2381. will define the breakpoint immediately after this instruction, and resume
  2382. the Process. Once the Wait() has completed, the Process will be suspended
  2383. after the JSR instruction. NOTE: before using this menu item, in this
  2384. example it is necessary to move the PC to the instruction before the
  2385. 'move.w #,$dff09a' (ie: you MUST NOT use it with the PC at this instruction).
  2386. To move the PC to the previous instruction, you merely need to RMB on the
  2387. mnemonic of the instruction in the disassembly window. Remember this!
  2388.  
  2389. * ------------------------------------------------------------------------- *
  2390.  
  2391. 18) Hardware Monitor
  2392. ====================
  2393.  
  2394.     If enabled, the hardware monitor allows an active Process to
  2395. alter the values of certain hardware registers, without crashing the system
  2396. when the Process is suspended. This also applies to a Process being active
  2397. in the sense of only executing a single instruction. At present, the status
  2398. of DMA flags, interrupt flags, and ADK flags are monitored, as well as most
  2399. system vectors. Support is not available for any Process which alters the
  2400. VBR. In addition, the Odd Address, Trace and Illegal vectors must not be
  2401. altered by the Process, since they are used by Disect.
  2402.  
  2403.     The hardware monitor is enabled/disabled either using the first
  2404. item in the 'Hardware' menu, or by pressing the '/' (or '?') key. 
  2405.  
  2406.     The next three menu items will open request windows with which
  2407. the current Process DMA/INT/ADK flags can be seen, and altered using check
  2408. gadgets. The INT flags request window also contains a string gadget with
  2409. which you can alter the Process's interrupt level held in the status
  2410. register.
  2411.  
  2412.     The next menu item allows access to a window which displays the
  2413. current Process vector addresses. These are automatically monitored whenever
  2414. your Process is resumed, and when it suspends. Note that it is NOT safe to
  2415. run a Process which alters the VBR. Also, the Odd Address, Trace, and Illegal
  2416. vector addresses must not be changed.
  2417.  
  2418.     The next menu item opens a window which allows the required
  2419. blitter registers to be defined. Whenever an instruction which writes to
  2420. a blitter register is executed or traced, Disect will automatically store
  2421. the required value. This feature is used for Processes which, for example,
  2422. define BLTAMOD at the start, and then expect it to remain unchanged.
  2423.  
  2424.     Following these are four menu items involved with defining the
  2425. required addresses for COP1LC and COP2LC when the Process is active. The two
  2426. check-items define which of COPJMP1 or COPJMP2 are to be strobed after the
  2427. required addresses have been written (either one of these, or neither). It
  2428. is not possible for Disect to automatically track the required addresses in
  2429. the same way as it is possible for DMA,etc flags, although if any instruction
  2430. is single-stepped which writes to COP1LC or COP2LC, then Disect will store
  2431. the required address. Similarly, any write to COPJMP1 or COPJMP2 will define
  2432. which of the two is to be used. This is not possible if a Process is resumed,
  2433. and the Process then writes to these registers while it is active.    
  2434.     The next menu item allows the defined copper list to be run.
  2435. This is useful with a Process which has a copper interrupt routine which,
  2436. for example, monitors the position of a mouse pointer. By running the copper
  2437. list, with copper DMA and interrupts enabled, and raster/sprite DMA, it is
  2438. then possible to move the pointer to a known position on the screen, and
  2439. press the LMB. To return to Disect, simply press both mouse buttons. Then,
  2440. you could trace your Process, which should respond to a mouse click over
  2441. a known screen position.
  2442.  
  2443.     The next menu item ('Stack Top Address') allows you to define
  2444. the address above the stack whenever your Process directly alters a7, ie:
  2445. stack top address = highest stack address + 1. If you trace/execute a move
  2446. to a7, then this is defined automatically. Disect does not permit this if
  2447. the new stack memory is not part of your project. (In this case, you can
  2448. make it so by saving a MultiBin file). Once this address has been defined,
  2449. then Disect will not save the Process's stack when saving a Process's status
  2450. in a MultiBin file, since this memory should be part of the project. See also
  2451. the section about MultiBin files.
  2452.  
  2453.     Disect also allows two user-definable functions to be used, one
  2454. to be called immediately before the Process is resumed (Pre-Execute), and
  2455. one to be called immediately before the Process is suspended (Post-Execute).
  2456. These functions are called by the Process itself (not by Disect). Each is
  2457. defined via its own request window, which contains a string gadget for input
  2458. of the function address, and a check gadget which is used to enable/disable
  2459. the function. A 'Load' gadget also allows an executable file to be loaded to
  2460. be used as a function.
  2461.     Also in these request windows are 16 check gadgets which define
  2462. which registers must be preserved during the function, and 16 string gadgets
  2463. which allow register values to be passed to the function. If a register is
  2464. preserved, then it will be the same after the function as it was before the
  2465. function was called; any registers which are not preserved will contain the
  2466. return values from the function.
  2467.     Any enabled function will be executed in Supervisor mode. The
  2468. function MUST remain in Supervisor mode, and MUST end with an 'RTS'.
  2469.     As an example of the use of these functions, suppose you were
  2470. dissecting a Process which used the hardware to read a disk. The Process
  2471. will alter the system DMA/INT/ADK flags, which will prove to be no problem.
  2472. After single-stepping the code, you might reach the first disk read. The
  2473. Process can be resumed until after this, using a stop breakpoint. Suppose
  2474. that a little later, there is another disk read, at which point, under normal
  2475. execution, the drive motor will still be active, although under Disect, this
  2476. would not be so. In order to resume the Process until after this second disk
  2477. read, it is necessary to start the drive (otherwise, the Process will most
  2478. probably simply lock-up, with the hardware being in the state required by
  2479. the Process, not the OS). There are two alternatives: if the Process contains
  2480. a subroutine which only starts the drive, then this can be used as the Pre-
  2481. Execute function; or you could write a short bit of code to do this - perhaps
  2482. by disassembling a small part of the Process to a source file - and assemble
  2483. it as an executable file, which can be loaded to be used as the Pre-Execute
  2484. function.
  2485.     The Pre-/Post-Execute functions could also be written to setup
  2486. any required hardware registers for the Process (Pre-), then restore them
  2487. for the OS (Post-). Hopefully, this will overcome any compatibility problems
  2488. which may occur...
  2489.  
  2490.     A word of advice concerning blitter code. If you are debugging
  2491. some code which uses the blitter, then it is safe to execute such code as
  2492. long as you use the hardware monitor (assuming that the Process has already
  2493. 'killed the system'/defined any required interrupt vectors - ie: as long as
  2494. no interrupts will occur which cause the OS to be called). By defining a stop
  2495. breakpoint after the instruction which writes to BLTSIZE, and resuming the
  2496. Process from the first instruction which writes a blitter address pointer,
  2497. the blit will begin with the hardware in the state required by the Process,
  2498. the breakpoint will be reached, Disect will wait for the blit to finish, and
  2499. then will restore the hardware for the OS.
  2500.  
  2501.     There is one last thing I ought to mention, concerning count and
  2502. conditional breakpoints. Whenever the Process reaches either of these two
  2503. breakpoint types, then it will be suspended while Disect evaluates the break-
  2504. point in order to decide if the Process should be permanently suspended; if
  2505. not, then Disect will allow the Process to resume. The thing to note is that
  2506. when the Process is suspended (and possibly resumed), then any enabled Pre/
  2507. Post-Execute functions will be called. This will occur each time the break-
  2508. point is reached, until the Process is ultimately suspended.
  2509.  
  2510. * ------------------------------------------------------------------------- *
  2511.  
  2512. 19) 68020 Modes/Instructions
  2513. ============================
  2514.  
  2515.     The following notes concern 68020-specific addressing modes, and
  2516. instructions:
  2517.  
  2518. 1. In a 68020 effective address, only the base displacement can be replaced
  2519. by a symbol; the outer displacement cannot. For PC-relative modes, the value
  2520. displayed for the base displacement will be the result of adding it to the
  2521. PC value for the instruction. This address will be automatically replaced by
  2522. a matching program symbol (if the current preferences permit this). For modes
  2523. where the base register is an address register, if the base displacement is
  2524. a long, then an automatic program symbol match is checked for in the same
  2525. way.
  2526.  
  2527. 2. The offset and width values for bit field instructions can be replaced by
  2528. symbols, although only a single user constant symbol is permitted. When using
  2529. the symbol selection window to replace a bit field offset/width value, the
  2530. symbol search type is pre-defined, and cannot be altered. Since these values
  2531. can be replaced by only one symbol each, the facility to enter an existing
  2532. symbol name (to be used as an offset) will be disabled.
  2533.   If you replace a bit field value, the address of the BF instruction is not
  2534. logged in the usual way. This has no other implications, except it may save
  2535. you a little memory.
  2536.  
  2537. 3. When a Process exists, during calculation of a 68020 effective address,
  2538. if any memory indirection attempts to read a non-existant address, then the
  2539. effective address will be considered invalid, and will not be displayed.
  2540. Also, if you're using a pre-68020 processor, any disassembly of 68020 modes
  2541. which attempts to perform a memory indirection at an odd address will render
  2542. the EA invalid, hence it will not be displayed.
  2543.  
  2544. 4. The following 68020 instructions are not implemented: CAS, CAS2, CALLM,
  2545. RTM, PACK, UNPK.
  2546.  
  2547. * ------------------------------------------------------------------------- *
  2548.  
  2549. 20) Installing To Hard Drive
  2550. ============================
  2551.  
  2552.     Ok, on the disk, the file 'DisectV1.8' is in fact a script. This
  2553. contains an ASSIGN:
  2554.  
  2555. ASSIGN DISECT: DisectV1.8:
  2556.  
  2557.     The last name of this may be changed to reflect the partition
  2558. name where you wish to put Disect. Other than this, NOTHING else should be
  2559. altered. Simply copy the FOUR directories and FOUR files from the (floppy)
  2560. disk to (where-ever!). Important: DO NOT give the executable ('Disect.exe')
  2561. an icon in order to double-click on it to launch the program: ALWAYS double-
  2562. click on the script file ('DisectV1.8')
  2563.  
  2564. * ------------------------------------------------------------------------- *
  2565.  
  2566. 21) Contact Address
  2567. ===================
  2568.  
  2569.     If you have any problems or suggestions concerning Disect, or
  2570. if you want the full version, here's the address to which you should send
  2571. a cheque or postal order for £30 (English!!).
  2572.  
  2573.     Dave Alderson
  2574.     86, Powell Ave
  2575.     Marton
  2576.     Blackpool
  2577.     Lancashire
  2578.     England
  2579.     FY4 3HH
  2580.  
  2581.     Last, but certainly by no means least, many, many, many thanks
  2582. to Bill Westhead for helping spread the (e-mail) word, and also to the
  2583. following people for helping to test out the early versions:
  2584.  
  2585.     Marc Kelly
  2586.     Mark Manning
  2587.  
  2588. Hark!
  2589. Is that the sound
  2590. of thirty pound
  2591. at the front door?
  2592. No! So,
  2593. perhaps we must
  2594. just
  2595. wait a little more ??? !!! ...
  2596.  
  2597. * ------------------------------------------------------------------------- *